{-# 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.Content.Pos.Get
(
PosGetResource
, posGet
, PosGet
, pMerchantId
, pStoreCode
, pTargetMerchantId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type PosGetResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"pos" :>
Capture "targetMerchantId" (Textual Word64) :>
"store" :>
Capture "storeCode" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] PosStore
data PosGet = PosGet'
{ _pMerchantId :: !(Textual Word64)
, _pStoreCode :: !Text
, _pTargetMerchantId :: !(Textual Word64)
} deriving (Eq,Show,Data,Typeable,Generic)
posGet
:: Word64
-> Text
-> Word64
-> PosGet
posGet pPMerchantId_ pPStoreCode_ pPTargetMerchantId_ =
PosGet'
{ _pMerchantId = _Coerce # pPMerchantId_
, _pStoreCode = pPStoreCode_
, _pTargetMerchantId = _Coerce # pPTargetMerchantId_
}
pMerchantId :: Lens' PosGet Word64
pMerchantId
= lens _pMerchantId (\ s a -> s{_pMerchantId = a}) .
_Coerce
pStoreCode :: Lens' PosGet Text
pStoreCode
= lens _pStoreCode (\ s a -> s{_pStoreCode = a})
pTargetMerchantId :: Lens' PosGet Word64
pTargetMerchantId
= lens _pTargetMerchantId
(\ s a -> s{_pTargetMerchantId = a})
. _Coerce
instance GoogleRequest PosGet where
type Rs PosGet = PosStore
type Scopes PosGet =
'["https://www.googleapis.com/auth/content"]
requestClient PosGet'{..}
= go _pMerchantId _pTargetMerchantId _pStoreCode
(Just AltJSON)
shoppingContentService
where go
= buildClient (Proxy :: Proxy PosGetResource) mempty