{-# 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.PromoOffer.Get
(
PromoOfferGetResource
, promoOfferGet
, PromoOfferGet
, pogManufacturer
, pogSerial
, pogDevice
, pogModel
, pogProduct
, pogAndroidId
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type PromoOfferGetResource =
"books" :>
"v1" :>
"promooffer" :>
"get" :>
QueryParam "manufacturer" Text :>
QueryParam "serial" Text :>
QueryParam "device" Text :>
QueryParam "model" Text :>
QueryParam "product" Text :>
QueryParam "androidId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Offers
data PromoOfferGet = PromoOfferGet'
{ _pogManufacturer :: !(Maybe Text)
, _pogSerial :: !(Maybe Text)
, _pogDevice :: !(Maybe Text)
, _pogModel :: !(Maybe Text)
, _pogProduct :: !(Maybe Text)
, _pogAndroidId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
promoOfferGet
:: PromoOfferGet
promoOfferGet =
PromoOfferGet'
{ _pogManufacturer = Nothing
, _pogSerial = Nothing
, _pogDevice = Nothing
, _pogModel = Nothing
, _pogProduct = Nothing
, _pogAndroidId = Nothing
}
pogManufacturer :: Lens' PromoOfferGet (Maybe Text)
pogManufacturer
= lens _pogManufacturer
(\ s a -> s{_pogManufacturer = a})
pogSerial :: Lens' PromoOfferGet (Maybe Text)
pogSerial
= lens _pogSerial (\ s a -> s{_pogSerial = a})
pogDevice :: Lens' PromoOfferGet (Maybe Text)
pogDevice
= lens _pogDevice (\ s a -> s{_pogDevice = a})
pogModel :: Lens' PromoOfferGet (Maybe Text)
pogModel = lens _pogModel (\ s a -> s{_pogModel = a})
pogProduct :: Lens' PromoOfferGet (Maybe Text)
pogProduct
= lens _pogProduct (\ s a -> s{_pogProduct = a})
pogAndroidId :: Lens' PromoOfferGet (Maybe Text)
pogAndroidId
= lens _pogAndroidId (\ s a -> s{_pogAndroidId = a})
instance GoogleRequest PromoOfferGet where
type Rs PromoOfferGet = Offers
type Scopes PromoOfferGet =
'["https://www.googleapis.com/auth/books"]
requestClient PromoOfferGet'{..}
= go _pogManufacturer _pogSerial _pogDevice _pogModel
_pogProduct
_pogAndroidId
(Just AltJSON)
booksService
where go
= buildClient (Proxy :: Proxy PromoOfferGetResource)
mempty