{-# 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.Get
(
OrderDocumentsGetResource
, orderDocumentsGet
, OrderDocumentsGet
, odgProFileId
, odgId
, odgProjectId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type OrderDocumentsGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"projects" :>
Capture "projectId" (Textual Int64) :>
"orderDocuments" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] OrderDocument
data OrderDocumentsGet = OrderDocumentsGet'
{ _odgProFileId :: !(Textual Int64)
, _odgId :: !(Textual Int64)
, _odgProjectId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
orderDocumentsGet
:: Int64
-> Int64
-> Int64
-> OrderDocumentsGet
orderDocumentsGet pOdgProFileId_ pOdgId_ pOdgProjectId_ =
OrderDocumentsGet'
{ _odgProFileId = _Coerce # pOdgProFileId_
, _odgId = _Coerce # pOdgId_
, _odgProjectId = _Coerce # pOdgProjectId_
}
odgProFileId :: Lens' OrderDocumentsGet Int64
odgProFileId
= lens _odgProFileId (\ s a -> s{_odgProFileId = a})
. _Coerce
odgId :: Lens' OrderDocumentsGet Int64
odgId
= lens _odgId (\ s a -> s{_odgId = a}) . _Coerce
odgProjectId :: Lens' OrderDocumentsGet Int64
odgProjectId
= lens _odgProjectId (\ s a -> s{_odgProjectId = a})
. _Coerce
instance GoogleRequest OrderDocumentsGet where
type Rs OrderDocumentsGet = OrderDocument
type Scopes OrderDocumentsGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient OrderDocumentsGet'{..}
= go _odgProFileId _odgProjectId _odgId
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy OrderDocumentsGetResource)
mempty