{-# 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.OrderDocuments.List
(
OrderDocumentsListResource
, orderDocumentsList
, OrderDocumentsList
, odlSearchString
, odlIds
, odlProFileId
, odlSortOrder
, odlPageToken
, odlProjectId
, odlSortField
, odlOrderId
, odlApproved
, odlSiteId
, odlMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type OrderDocumentsListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"projects" :>
Capture "projectId" (Textual Int64) :>
"orderDocuments" :>
QueryParam "searchString" Text :>
QueryParams "ids" (Textual Int64) :>
QueryParam "sortOrder" OrderDocumentsListSortOrder :>
QueryParam "pageToken" Text :>
QueryParam "sortField" OrderDocumentsListSortField :>
QueryParams "orderId" (Textual Int64) :>
QueryParam "approved" Bool :>
QueryParams "siteId" (Textual Int64) :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] OrderDocumentsListResponse
data OrderDocumentsList = OrderDocumentsList'
{ _odlSearchString :: !(Maybe Text)
, _odlIds :: !(Maybe [Textual Int64])
, _odlProFileId :: !(Textual Int64)
, _odlSortOrder :: !OrderDocumentsListSortOrder
, _odlPageToken :: !(Maybe Text)
, _odlProjectId :: !(Textual Int64)
, _odlSortField :: !OrderDocumentsListSortField
, _odlOrderId :: !(Maybe [Textual Int64])
, _odlApproved :: !(Maybe Bool)
, _odlSiteId :: !(Maybe [Textual Int64])
, _odlMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
orderDocumentsList
:: Int64
-> Int64
-> OrderDocumentsList
orderDocumentsList pOdlProFileId_ pOdlProjectId_ =
OrderDocumentsList'
{ _odlSearchString = Nothing
, _odlIds = Nothing
, _odlProFileId = _Coerce # pOdlProFileId_
, _odlSortOrder = ODLSOAscending
, _odlPageToken = Nothing
, _odlProjectId = _Coerce # pOdlProjectId_
, _odlSortField = ODLSFID
, _odlOrderId = Nothing
, _odlApproved = Nothing
, _odlSiteId = Nothing
, _odlMaxResults = 1000
}
odlSearchString :: Lens' OrderDocumentsList (Maybe Text)
odlSearchString
= lens _odlSearchString
(\ s a -> s{_odlSearchString = a})
odlIds :: Lens' OrderDocumentsList [Int64]
odlIds
= lens _odlIds (\ s a -> s{_odlIds = a}) . _Default .
_Coerce
odlProFileId :: Lens' OrderDocumentsList Int64
odlProFileId
= lens _odlProFileId (\ s a -> s{_odlProFileId = a})
. _Coerce
odlSortOrder :: Lens' OrderDocumentsList OrderDocumentsListSortOrder
odlSortOrder
= lens _odlSortOrder (\ s a -> s{_odlSortOrder = a})
odlPageToken :: Lens' OrderDocumentsList (Maybe Text)
odlPageToken
= lens _odlPageToken (\ s a -> s{_odlPageToken = a})
odlProjectId :: Lens' OrderDocumentsList Int64
odlProjectId
= lens _odlProjectId (\ s a -> s{_odlProjectId = a})
. _Coerce
odlSortField :: Lens' OrderDocumentsList OrderDocumentsListSortField
odlSortField
= lens _odlSortField (\ s a -> s{_odlSortField = a})
odlOrderId :: Lens' OrderDocumentsList [Int64]
odlOrderId
= lens _odlOrderId (\ s a -> s{_odlOrderId = a}) .
_Default
. _Coerce
odlApproved :: Lens' OrderDocumentsList (Maybe Bool)
odlApproved
= lens _odlApproved (\ s a -> s{_odlApproved = a})
odlSiteId :: Lens' OrderDocumentsList [Int64]
odlSiteId
= lens _odlSiteId (\ s a -> s{_odlSiteId = a}) .
_Default
. _Coerce
odlMaxResults :: Lens' OrderDocumentsList Int32
odlMaxResults
= lens _odlMaxResults
(\ s a -> s{_odlMaxResults = a})
. _Coerce
instance GoogleRequest OrderDocumentsList where
type Rs OrderDocumentsList =
OrderDocumentsListResponse
type Scopes OrderDocumentsList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient OrderDocumentsList'{..}
= go _odlProFileId _odlProjectId _odlSearchString
(_odlIds ^. _Default)
(Just _odlSortOrder)
_odlPageToken
(Just _odlSortField)
(_odlOrderId ^. _Default)
_odlApproved
(_odlSiteId ^. _Default)
(Just _odlMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy OrderDocumentsListResource)
mempty