{-# 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.DirectorySiteContacts.List
(
DirectorySiteContactsListResource
, directorySiteContactsList
, DirectorySiteContactsList
, dsclSearchString
, dsclIds
, dsclProFileId
, dsclDirectorySiteIds
, dsclSortOrder
, dsclPageToken
, dsclSortField
, dsclMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type DirectorySiteContactsListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"directorySiteContacts" :>
QueryParam "searchString" Text :>
QueryParams "ids" (Textual Int64) :>
QueryParams "directorySiteIds" (Textual Int64) :>
QueryParam "sortOrder"
DirectorySiteContactsListSortOrder
:>
QueryParam "pageToken" Text :>
QueryParam "sortField"
DirectorySiteContactsListSortField
:>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] DirectorySiteContactsListResponse
data DirectorySiteContactsList = DirectorySiteContactsList'
{ _dsclSearchString :: !(Maybe Text)
, _dsclIds :: !(Maybe [Textual Int64])
, _dsclProFileId :: !(Textual Int64)
, _dsclDirectorySiteIds :: !(Maybe [Textual Int64])
, _dsclSortOrder :: !DirectorySiteContactsListSortOrder
, _dsclPageToken :: !(Maybe Text)
, _dsclSortField :: !DirectorySiteContactsListSortField
, _dsclMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
directorySiteContactsList
:: Int64
-> DirectorySiteContactsList
directorySiteContactsList pDsclProFileId_ =
DirectorySiteContactsList'
{ _dsclSearchString = Nothing
, _dsclIds = Nothing
, _dsclProFileId = _Coerce # pDsclProFileId_
, _dsclDirectorySiteIds = Nothing
, _dsclSortOrder = DSCLSOAscending
, _dsclPageToken = Nothing
, _dsclSortField = DSCLSFID
, _dsclMaxResults = 1000
}
dsclSearchString :: Lens' DirectorySiteContactsList (Maybe Text)
dsclSearchString
= lens _dsclSearchString
(\ s a -> s{_dsclSearchString = a})
dsclIds :: Lens' DirectorySiteContactsList [Int64]
dsclIds
= lens _dsclIds (\ s a -> s{_dsclIds = a}) . _Default
. _Coerce
dsclProFileId :: Lens' DirectorySiteContactsList Int64
dsclProFileId
= lens _dsclProFileId
(\ s a -> s{_dsclProFileId = a})
. _Coerce
dsclDirectorySiteIds :: Lens' DirectorySiteContactsList [Int64]
dsclDirectorySiteIds
= lens _dsclDirectorySiteIds
(\ s a -> s{_dsclDirectorySiteIds = a})
. _Default
. _Coerce
dsclSortOrder :: Lens' DirectorySiteContactsList DirectorySiteContactsListSortOrder
dsclSortOrder
= lens _dsclSortOrder
(\ s a -> s{_dsclSortOrder = a})
dsclPageToken :: Lens' DirectorySiteContactsList (Maybe Text)
dsclPageToken
= lens _dsclPageToken
(\ s a -> s{_dsclPageToken = a})
dsclSortField :: Lens' DirectorySiteContactsList DirectorySiteContactsListSortField
dsclSortField
= lens _dsclSortField
(\ s a -> s{_dsclSortField = a})
dsclMaxResults :: Lens' DirectorySiteContactsList Int32
dsclMaxResults
= lens _dsclMaxResults
(\ s a -> s{_dsclMaxResults = a})
. _Coerce
instance GoogleRequest DirectorySiteContactsList
where
type Rs DirectorySiteContactsList =
DirectorySiteContactsListResponse
type Scopes DirectorySiteContactsList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient DirectorySiteContactsList'{..}
= go _dsclProFileId _dsclSearchString
(_dsclIds ^. _Default)
(_dsclDirectorySiteIds ^. _Default)
(Just _dsclSortOrder)
_dsclPageToken
(Just _dsclSortField)
(Just _dsclMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy DirectorySiteContactsListResource)
mempty