{-# 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.List
(
ManagementRemarketingAudienceListResource
, managementRemarketingAudienceList
, ManagementRemarketingAudienceList
, mralWebPropertyId
, mralAccountId
, mralType
, mralStartIndex
, mralMaxResults
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementRemarketingAudienceListResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"remarketingAudiences" :>
QueryParam "type" Text :>
QueryParam "start-index" (Textual Int32) :>
QueryParam "max-results" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] RemarketingAudiences
data ManagementRemarketingAudienceList = ManagementRemarketingAudienceList'
{ _mralWebPropertyId :: !Text
, _mralAccountId :: !Text
, _mralType :: !Text
, _mralStartIndex :: !(Maybe (Textual Int32))
, _mralMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
managementRemarketingAudienceList
:: Text
-> Text
-> ManagementRemarketingAudienceList
managementRemarketingAudienceList pMralWebPropertyId_ pMralAccountId_ =
ManagementRemarketingAudienceList'
{ _mralWebPropertyId = pMralWebPropertyId_
, _mralAccountId = pMralAccountId_
, _mralType = "all"
, _mralStartIndex = Nothing
, _mralMaxResults = Nothing
}
mralWebPropertyId :: Lens' ManagementRemarketingAudienceList Text
mralWebPropertyId
= lens _mralWebPropertyId
(\ s a -> s{_mralWebPropertyId = a})
mralAccountId :: Lens' ManagementRemarketingAudienceList Text
mralAccountId
= lens _mralAccountId
(\ s a -> s{_mralAccountId = a})
mralType :: Lens' ManagementRemarketingAudienceList Text
mralType = lens _mralType (\ s a -> s{_mralType = a})
mralStartIndex :: Lens' ManagementRemarketingAudienceList (Maybe Int32)
mralStartIndex
= lens _mralStartIndex
(\ s a -> s{_mralStartIndex = a})
. mapping _Coerce
mralMaxResults :: Lens' ManagementRemarketingAudienceList (Maybe Int32)
mralMaxResults
= lens _mralMaxResults
(\ s a -> s{_mralMaxResults = a})
. mapping _Coerce
instance GoogleRequest
ManagementRemarketingAudienceList where
type Rs ManagementRemarketingAudienceList =
RemarketingAudiences
type Scopes ManagementRemarketingAudienceList =
'["https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ManagementRemarketingAudienceList'{..}
= go _mralAccountId _mralWebPropertyId
(Just _mralType)
_mralStartIndex
_mralMaxResults
(Just AltJSON)
analyticsService
where go
= buildClient
(Proxy ::
Proxy ManagementRemarketingAudienceListResource)
mempty