{-# 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.RemarketingAudience.Insert
(
ManagementRemarketingAudienceInsertResource
, managementRemarketingAudienceInsert
, ManagementRemarketingAudienceInsert
, mraiWebPropertyId
, mraiPayload
, mraiAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementRemarketingAudienceInsertResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"remarketingAudiences" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] RemarketingAudience :>
Post '[JSON] RemarketingAudience
data ManagementRemarketingAudienceInsert = ManagementRemarketingAudienceInsert'
{ _mraiWebPropertyId :: !Text
, _mraiPayload :: !RemarketingAudience
, _mraiAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementRemarketingAudienceInsert
:: Text
-> RemarketingAudience
-> Text
-> ManagementRemarketingAudienceInsert
managementRemarketingAudienceInsert pMraiWebPropertyId_ pMraiPayload_ pMraiAccountId_ =
ManagementRemarketingAudienceInsert'
{ _mraiWebPropertyId = pMraiWebPropertyId_
, _mraiPayload = pMraiPayload_
, _mraiAccountId = pMraiAccountId_
}
mraiWebPropertyId :: Lens' ManagementRemarketingAudienceInsert Text
mraiWebPropertyId
= lens _mraiWebPropertyId
(\ s a -> s{_mraiWebPropertyId = a})
mraiPayload :: Lens' ManagementRemarketingAudienceInsert RemarketingAudience
mraiPayload
= lens _mraiPayload (\ s a -> s{_mraiPayload = a})
mraiAccountId :: Lens' ManagementRemarketingAudienceInsert Text
mraiAccountId
= lens _mraiAccountId
(\ s a -> s{_mraiAccountId = a})
instance GoogleRequest
ManagementRemarketingAudienceInsert where
type Rs ManagementRemarketingAudienceInsert =
RemarketingAudience
type Scopes ManagementRemarketingAudienceInsert =
'["https://www.googleapis.com/auth/analytics.edit"]
requestClient
ManagementRemarketingAudienceInsert'{..}
= go _mraiAccountId _mraiWebPropertyId (Just AltJSON)
_mraiPayload
analyticsService
where go
= buildClient
(Proxy ::
Proxy ManagementRemarketingAudienceInsertResource)
mempty