{-# 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.ProFileFilterLinks.Insert
(
ManagementProFileFilterLinksInsertResource
, managementProFileFilterLinksInsert
, ManagementProFileFilterLinksInsert
, mpffliWebPropertyId
, mpffliProFileId
, mpffliPayload
, mpffliAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementProFileFilterLinksInsertResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"profiles" :>
Capture "profileId" Text :>
"profileFilterLinks" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ProFileFilterLink :>
Post '[JSON] ProFileFilterLink
-- | Create a new profile filter link.
--
-- /See:/ 'managementProFileFilterLinksInsert' smart constructor.
data ManagementProFileFilterLinksInsert = ManagementProFileFilterLinksInsert'
{ _mpffliWebPropertyId :: !Text
, _mpffliProFileId :: !Text
, _mpffliPayload :: !ProFileFilterLink
, _mpffliAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'ManagementProFileFilterLinksInsert' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mpffliWebPropertyId'
--
-- * 'mpffliProFileId'
--
-- * 'mpffliPayload'
--
-- * 'mpffliAccountId'
managementProFileFilterLinksInsert
:: Text -- ^ 'mpffliWebPropertyId'
-> Text -- ^ 'mpffliProFileId'
-> ProFileFilterLink -- ^ 'mpffliPayload'
-> Text -- ^ 'mpffliAccountId'
-> ManagementProFileFilterLinksInsert
managementProFileFilterLinksInsert pMpffliWebPropertyId_ pMpffliProFileId_ pMpffliPayload_ pMpffliAccountId_ =
ManagementProFileFilterLinksInsert'
{ _mpffliWebPropertyId = pMpffliWebPropertyId_
, _mpffliProFileId = pMpffliProFileId_
, _mpffliPayload = pMpffliPayload_
, _mpffliAccountId = pMpffliAccountId_
}
-- | Web property Id to create profile filter link for.
mpffliWebPropertyId :: Lens' ManagementProFileFilterLinksInsert Text
mpffliWebPropertyId
= lens _mpffliWebPropertyId
(\ s a -> s{_mpffliWebPropertyId = a})
-- | Profile ID to create filter link for.
mpffliProFileId :: Lens' ManagementProFileFilterLinksInsert Text
mpffliProFileId
= lens _mpffliProFileId
(\ s a -> s{_mpffliProFileId = a})
-- | Multipart request metadata.
mpffliPayload :: Lens' ManagementProFileFilterLinksInsert ProFileFilterLink
mpffliPayload
= lens _mpffliPayload
(\ s a -> s{_mpffliPayload = a})
-- | Account ID to create profile filter link for.
mpffliAccountId :: Lens' ManagementProFileFilterLinksInsert Text
mpffliAccountId
= lens _mpffliAccountId
(\ s a -> s{_mpffliAccountId = a})
instance GoogleRequest
ManagementProFileFilterLinksInsert where
type Rs ManagementProFileFilterLinksInsert =
ProFileFilterLink
type Scopes ManagementProFileFilterLinksInsert =
'["https://www.googleapis.com/auth/analytics.edit"]
requestClient ManagementProFileFilterLinksInsert'{..}
= go _mpffliAccountId _mpffliWebPropertyId
_mpffliProFileId
(Just AltJSON)
_mpffliPayload
analyticsService
where go
= buildClient
(Proxy ::
Proxy ManagementProFileFilterLinksInsertResource)
mempty