{-# 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.ConsumerSurveys.MobileApppanels.Update
(
MobileApppanelsUpdateResource
, mobileApppanelsUpdate
, MobileApppanelsUpdate
, mauPayload
, mauPanelId
) where
import Network.Google.ConsumerSurveys.Types
import Network.Google.Prelude
type MobileApppanelsUpdateResource =
"consumersurveys" :>
"v2" :>
"mobileAppPanels" :>
Capture "panelId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] MobileAppPanel :>
Put '[JSON] MobileAppPanel
data MobileApppanelsUpdate = MobileApppanelsUpdate'
{ _mauPayload :: !MobileAppPanel
, _mauPanelId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
mobileApppanelsUpdate
:: MobileAppPanel
-> Text
-> MobileApppanelsUpdate
mobileApppanelsUpdate pMauPayload_ pMauPanelId_ =
MobileApppanelsUpdate'
{ _mauPayload = pMauPayload_
, _mauPanelId = pMauPanelId_
}
mauPayload :: Lens' MobileApppanelsUpdate MobileAppPanel
mauPayload
= lens _mauPayload (\ s a -> s{_mauPayload = a})
mauPanelId :: Lens' MobileApppanelsUpdate Text
mauPanelId
= lens _mauPanelId (\ s a -> s{_mauPanelId = a})
instance GoogleRequest MobileApppanelsUpdate where
type Rs MobileApppanelsUpdate = MobileAppPanel
type Scopes MobileApppanelsUpdate =
'["https://www.googleapis.com/auth/consumersurveys",
"https://www.googleapis.com/auth/userinfo.email"]
requestClient MobileApppanelsUpdate'{..}
= go _mauPanelId (Just AltJSON) _mauPayload
consumerSurveysService
where go
= buildClient
(Proxy :: Proxy MobileApppanelsUpdateResource)
mempty