{-# 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.Update
(
ManagementFiltersUpdateResource
, managementFiltersUpdate
, ManagementFiltersUpdate
, mfuFilterId
, mfuPayload
, mfuAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementFiltersUpdateResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"filters" :>
Capture "filterId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Filter :> Put '[JSON] Filter
data ManagementFiltersUpdate = ManagementFiltersUpdate'
{ _mfuFilterId :: !Text
, _mfuPayload :: !Filter
, _mfuAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementFiltersUpdate
:: Text
-> Filter
-> Text
-> ManagementFiltersUpdate
managementFiltersUpdate pMfuFilterId_ pMfuPayload_ pMfuAccountId_ =
ManagementFiltersUpdate'
{ _mfuFilterId = pMfuFilterId_
, _mfuPayload = pMfuPayload_
, _mfuAccountId = pMfuAccountId_
}
mfuFilterId :: Lens' ManagementFiltersUpdate Text
mfuFilterId
= lens _mfuFilterId (\ s a -> s{_mfuFilterId = a})
mfuPayload :: Lens' ManagementFiltersUpdate Filter
mfuPayload
= lens _mfuPayload (\ s a -> s{_mfuPayload = a})
mfuAccountId :: Lens' ManagementFiltersUpdate Text
mfuAccountId
= lens _mfuAccountId (\ s a -> s{_mfuAccountId = a})
instance GoogleRequest ManagementFiltersUpdate where
type Rs ManagementFiltersUpdate = Filter
type Scopes ManagementFiltersUpdate =
'["https://www.googleapis.com/auth/analytics.edit"]
requestClient ManagementFiltersUpdate'{..}
= go _mfuAccountId _mfuFilterId (Just AltJSON)
_mfuPayload
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementFiltersUpdateResource)
mempty