{-# 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.Analytics.Management.Filters.Patch
(
ManagementFiltersPatchResource
, managementFiltersPatch
, ManagementFiltersPatch
, mfpFilterId
, mfpPayload
, mfpAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementFiltersPatchResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"filters" :>
Capture "filterId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Filter :> Patch '[JSON] Filter
data ManagementFiltersPatch = ManagementFiltersPatch'
{ _mfpFilterId :: !Text
, _mfpPayload :: !Filter
, _mfpAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementFiltersPatch
:: Text
-> Filter
-> Text
-> ManagementFiltersPatch
managementFiltersPatch pMfpFilterId_ pMfpPayload_ pMfpAccountId_ =
ManagementFiltersPatch'
{ _mfpFilterId = pMfpFilterId_
, _mfpPayload = pMfpPayload_
, _mfpAccountId = pMfpAccountId_
}
mfpFilterId :: Lens' ManagementFiltersPatch Text
mfpFilterId
= lens _mfpFilterId (\ s a -> s{_mfpFilterId = a})
mfpPayload :: Lens' ManagementFiltersPatch Filter
mfpPayload
= lens _mfpPayload (\ s a -> s{_mfpPayload = a})
mfpAccountId :: Lens' ManagementFiltersPatch Text
mfpAccountId
= lens _mfpAccountId (\ s a -> s{_mfpAccountId = a})
instance GoogleRequest ManagementFiltersPatch where
type Rs ManagementFiltersPatch = Filter
type Scopes ManagementFiltersPatch =
'["https://www.googleapis.com/auth/analytics.edit"]
requestClient ManagementFiltersPatch'{..}
= go _mfpAccountId _mfpFilterId (Just AltJSON)
_mfpPayload
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementFiltersPatchResource)
mempty