{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Books.MyConfig.ReleaseDownloadAccess
(
MyConfigReleaseDownloadAccessResource
, myConfigReleaseDownloadAccess
, MyConfigReleaseDownloadAccess
, mcrdaCpksver
, mcrdaLocale
, mcrdaVolumeIds
, mcrdaSource
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type MyConfigReleaseDownloadAccessResource =
"books" :>
"v1" :>
"myconfig" :>
"releaseDownloadAccess" :>
QueryParams "volumeIds" Text :>
QueryParam "cpksver" Text :>
QueryParam "locale" Text :>
QueryParam "source" Text :>
QueryParam "alt" AltJSON :>
Post '[JSON] DownloadAccesses
data MyConfigReleaseDownloadAccess = MyConfigReleaseDownloadAccess'
{ _mcrdaCpksver :: !Text
, _mcrdaLocale :: !(Maybe Text)
, _mcrdaVolumeIds :: ![Text]
, _mcrdaSource :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
myConfigReleaseDownloadAccess
:: Text
-> [Text]
-> MyConfigReleaseDownloadAccess
myConfigReleaseDownloadAccess pMcrdaCpksver_ pMcrdaVolumeIds_ =
MyConfigReleaseDownloadAccess'
{ _mcrdaCpksver = pMcrdaCpksver_
, _mcrdaLocale = Nothing
, _mcrdaVolumeIds = _Coerce # pMcrdaVolumeIds_
, _mcrdaSource = Nothing
}
mcrdaCpksver :: Lens' MyConfigReleaseDownloadAccess Text
mcrdaCpksver
= lens _mcrdaCpksver (\ s a -> s{_mcrdaCpksver = a})
mcrdaLocale :: Lens' MyConfigReleaseDownloadAccess (Maybe Text)
mcrdaLocale
= lens _mcrdaLocale (\ s a -> s{_mcrdaLocale = a})
mcrdaVolumeIds :: Lens' MyConfigReleaseDownloadAccess [Text]
mcrdaVolumeIds
= lens _mcrdaVolumeIds
(\ s a -> s{_mcrdaVolumeIds = a})
. _Coerce
mcrdaSource :: Lens' MyConfigReleaseDownloadAccess (Maybe Text)
mcrdaSource
= lens _mcrdaSource (\ s a -> s{_mcrdaSource = a})
instance GoogleRequest MyConfigReleaseDownloadAccess
where
type Rs MyConfigReleaseDownloadAccess =
DownloadAccesses
type Scopes MyConfigReleaseDownloadAccess =
'["https://www.googleapis.com/auth/books"]
requestClient MyConfigReleaseDownloadAccess'{..}
= go _mcrdaVolumeIds (Just _mcrdaCpksver)
_mcrdaLocale
_mcrdaSource
(Just AltJSON)
booksService
where go
= buildClient
(Proxy ::
Proxy MyConfigReleaseDownloadAccessResource)
mempty