{-# 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.Get
(
InventoryItemsGetResource
, inventoryItemsGet
, InventoryItemsGet
, iigProFileId
, iigId
, iigProjectId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type InventoryItemsGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"projects" :>
Capture "projectId" (Textual Int64) :>
"inventoryItems" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] InventoryItem
data InventoryItemsGet = InventoryItemsGet'
{ _iigProFileId :: !(Textual Int64)
, _iigId :: !(Textual Int64)
, _iigProjectId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
inventoryItemsGet
:: Int64
-> Int64
-> Int64
-> InventoryItemsGet
inventoryItemsGet pIigProFileId_ pIigId_ pIigProjectId_ =
InventoryItemsGet'
{ _iigProFileId = _Coerce # pIigProFileId_
, _iigId = _Coerce # pIigId_
, _iigProjectId = _Coerce # pIigProjectId_
}
iigProFileId :: Lens' InventoryItemsGet Int64
iigProFileId
= lens _iigProFileId (\ s a -> s{_iigProFileId = a})
. _Coerce
iigId :: Lens' InventoryItemsGet Int64
iigId
= lens _iigId (\ s a -> s{_iigId = a}) . _Coerce
iigProjectId :: Lens' InventoryItemsGet Int64
iigProjectId
= lens _iigProjectId (\ s a -> s{_iigProjectId = a})
. _Coerce
instance GoogleRequest InventoryItemsGet where
type Rs InventoryItemsGet = InventoryItem
type Scopes InventoryItemsGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient InventoryItemsGet'{..}
= go _iigProFileId _iigProjectId _iigId
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy InventoryItemsGetResource)
mempty