{-# 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.InventoryItems.List
(
InventoryItemsListResource
, inventoryItemsList
, InventoryItemsList
, iilIds
, iilProFileId
, iilSortOrder
, iilInPlan
, iilPageToken
, iilProjectId
, iilSortField
, iilType
, iilOrderId
, iilSiteId
, iilMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type InventoryItemsListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"projects" :>
Capture "projectId" (Textual Int64) :>
"inventoryItems" :>
QueryParams "ids" (Textual Int64) :>
QueryParam "sortOrder" InventoryItemsListSortOrder :>
QueryParam "inPlan" Bool :>
QueryParam "pageToken" Text :>
QueryParam "sortField" InventoryItemsListSortField :>
QueryParam "type" InventoryItemsListType :>
QueryParams "orderId" (Textual Int64) :>
QueryParams "siteId" (Textual Int64) :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] InventoryItemsListResponse
data InventoryItemsList = InventoryItemsList'
{ _iilIds :: !(Maybe [Textual Int64])
, _iilProFileId :: !(Textual Int64)
, _iilSortOrder :: !InventoryItemsListSortOrder
, _iilInPlan :: !(Maybe Bool)
, _iilPageToken :: !(Maybe Text)
, _iilProjectId :: !(Textual Int64)
, _iilSortField :: !InventoryItemsListSortField
, _iilType :: !(Maybe InventoryItemsListType)
, _iilOrderId :: !(Maybe [Textual Int64])
, _iilSiteId :: !(Maybe [Textual Int64])
, _iilMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
inventoryItemsList
:: Int64
-> Int64
-> InventoryItemsList
inventoryItemsList pIilProFileId_ pIilProjectId_ =
InventoryItemsList'
{ _iilIds = Nothing
, _iilProFileId = _Coerce # pIilProFileId_
, _iilSortOrder = IILSOAscending
, _iilInPlan = Nothing
, _iilPageToken = Nothing
, _iilProjectId = _Coerce # pIilProjectId_
, _iilSortField = IILSFID
, _iilType = Nothing
, _iilOrderId = Nothing
, _iilSiteId = Nothing
, _iilMaxResults = 1000
}
iilIds :: Lens' InventoryItemsList [Int64]
iilIds
= lens _iilIds (\ s a -> s{_iilIds = a}) . _Default .
_Coerce
iilProFileId :: Lens' InventoryItemsList Int64
iilProFileId
= lens _iilProFileId (\ s a -> s{_iilProFileId = a})
. _Coerce
iilSortOrder :: Lens' InventoryItemsList InventoryItemsListSortOrder
iilSortOrder
= lens _iilSortOrder (\ s a -> s{_iilSortOrder = a})
iilInPlan :: Lens' InventoryItemsList (Maybe Bool)
iilInPlan
= lens _iilInPlan (\ s a -> s{_iilInPlan = a})
iilPageToken :: Lens' InventoryItemsList (Maybe Text)
iilPageToken
= lens _iilPageToken (\ s a -> s{_iilPageToken = a})
iilProjectId :: Lens' InventoryItemsList Int64
iilProjectId
= lens _iilProjectId (\ s a -> s{_iilProjectId = a})
. _Coerce
iilSortField :: Lens' InventoryItemsList InventoryItemsListSortField
iilSortField
= lens _iilSortField (\ s a -> s{_iilSortField = a})
iilType :: Lens' InventoryItemsList (Maybe InventoryItemsListType)
iilType = lens _iilType (\ s a -> s{_iilType = a})
iilOrderId :: Lens' InventoryItemsList [Int64]
iilOrderId
= lens _iilOrderId (\ s a -> s{_iilOrderId = a}) .
_Default
. _Coerce
iilSiteId :: Lens' InventoryItemsList [Int64]
iilSiteId
= lens _iilSiteId (\ s a -> s{_iilSiteId = a}) .
_Default
. _Coerce
iilMaxResults :: Lens' InventoryItemsList Int32
iilMaxResults
= lens _iilMaxResults
(\ s a -> s{_iilMaxResults = a})
. _Coerce
instance GoogleRequest InventoryItemsList where
type Rs InventoryItemsList =
InventoryItemsListResponse
type Scopes InventoryItemsList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient InventoryItemsList'{..}
= go _iilProFileId _iilProjectId
(_iilIds ^. _Default)
(Just _iilSortOrder)
_iilInPlan
_iilPageToken
(Just _iilSortField)
_iilType
(_iilOrderId ^. _Default)
(_iilSiteId ^. _Default)
(Just _iilMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy InventoryItemsListResource)
mempty