{-# 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.Insert
(
PosInsertResource
, posInsert
, PosInsert
, ppMerchantId
, ppTargetMerchantId
, ppPayload
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type PosInsertResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"pos" :>
Capture "targetMerchantId" (Textual Word64) :>
"store" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] PosStore :> Post '[JSON] PosStore
data PosInsert = PosInsert'
{ _ppMerchantId :: !(Textual Word64)
, _ppTargetMerchantId :: !(Textual Word64)
, _ppPayload :: !PosStore
} deriving (Eq,Show,Data,Typeable,Generic)
posInsert
:: Word64
-> Word64
-> PosStore
-> PosInsert
posInsert pPpMerchantId_ pPpTargetMerchantId_ pPpPayload_ =
PosInsert'
{ _ppMerchantId = _Coerce # pPpMerchantId_
, _ppTargetMerchantId = _Coerce # pPpTargetMerchantId_
, _ppPayload = pPpPayload_
}
ppMerchantId :: Lens' PosInsert Word64
ppMerchantId
= lens _ppMerchantId (\ s a -> s{_ppMerchantId = a})
. _Coerce
ppTargetMerchantId :: Lens' PosInsert Word64
ppTargetMerchantId
= lens _ppTargetMerchantId
(\ s a -> s{_ppTargetMerchantId = a})
. _Coerce
ppPayload :: Lens' PosInsert PosStore
ppPayload
= lens _ppPayload (\ s a -> s{_ppPayload = a})
instance GoogleRequest PosInsert where
type Rs PosInsert = PosStore
type Scopes PosInsert =
'["https://www.googleapis.com/auth/content"]
requestClient PosInsert'{..}
= go _ppMerchantId _ppTargetMerchantId (Just AltJSON)
_ppPayload
shoppingContentService
where go
= buildClient (Proxy :: Proxy PosInsertResource)
mempty