{-# 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.DFAReporting.PlacementStrategies.List
(
PlacementStrategiesListResource
, placementStrategiesList
, PlacementStrategiesList
, pslSearchString
, pslIds
, pslProFileId
, pslSortOrder
, pslPageToken
, pslSortField
, pslMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type PlacementStrategiesListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"placementStrategies" :>
QueryParam "searchString" Text :>
QueryParams "ids" (Textual Int64) :>
QueryParam "sortOrder"
PlacementStrategiesListSortOrder
:>
QueryParam "pageToken" Text :>
QueryParam "sortField"
PlacementStrategiesListSortField
:>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] PlacementStrategiesListResponse
data PlacementStrategiesList = PlacementStrategiesList'
{ _pslSearchString :: !(Maybe Text)
, _pslIds :: !(Maybe [Textual Int64])
, _pslProFileId :: !(Textual Int64)
, _pslSortOrder :: !PlacementStrategiesListSortOrder
, _pslPageToken :: !(Maybe Text)
, _pslSortField :: !PlacementStrategiesListSortField
, _pslMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
placementStrategiesList
:: Int64
-> PlacementStrategiesList
placementStrategiesList pPslProFileId_ =
PlacementStrategiesList'
{ _pslSearchString = Nothing
, _pslIds = Nothing
, _pslProFileId = _Coerce # pPslProFileId_
, _pslSortOrder = PSLSOAscending
, _pslPageToken = Nothing
, _pslSortField = PSLSFID
, _pslMaxResults = 1000
}
pslSearchString :: Lens' PlacementStrategiesList (Maybe Text)
pslSearchString
= lens _pslSearchString
(\ s a -> s{_pslSearchString = a})
pslIds :: Lens' PlacementStrategiesList [Int64]
pslIds
= lens _pslIds (\ s a -> s{_pslIds = a}) . _Default .
_Coerce
pslProFileId :: Lens' PlacementStrategiesList Int64
pslProFileId
= lens _pslProFileId (\ s a -> s{_pslProFileId = a})
. _Coerce
pslSortOrder :: Lens' PlacementStrategiesList PlacementStrategiesListSortOrder
pslSortOrder
= lens _pslSortOrder (\ s a -> s{_pslSortOrder = a})
pslPageToken :: Lens' PlacementStrategiesList (Maybe Text)
pslPageToken
= lens _pslPageToken (\ s a -> s{_pslPageToken = a})
pslSortField :: Lens' PlacementStrategiesList PlacementStrategiesListSortField
pslSortField
= lens _pslSortField (\ s a -> s{_pslSortField = a})
pslMaxResults :: Lens' PlacementStrategiesList Int32
pslMaxResults
= lens _pslMaxResults
(\ s a -> s{_pslMaxResults = a})
. _Coerce
instance GoogleRequest PlacementStrategiesList where
type Rs PlacementStrategiesList =
PlacementStrategiesListResponse
type Scopes PlacementStrategiesList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient PlacementStrategiesList'{..}
= go _pslProFileId _pslSearchString
(_pslIds ^. _Default)
(Just _pslSortOrder)
_pslPageToken
(Just _pslSortField)
(Just _pslMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy PlacementStrategiesListResource)
mempty