{-# 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.Orders.Get
(
OrdersGetResource
, ordersGet
, OrdersGet
, ogProFileId
, ogId
, ogProjectId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type OrdersGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"projects" :>
Capture "projectId" (Textual Int64) :>
"orders" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] Order
data OrdersGet = OrdersGet'
{ _ogProFileId :: !(Textual Int64)
, _ogId :: !(Textual Int64)
, _ogProjectId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersGet
:: Int64
-> Int64
-> Int64
-> OrdersGet
ordersGet pOgProFileId_ pOgId_ pOgProjectId_ =
OrdersGet'
{ _ogProFileId = _Coerce # pOgProFileId_
, _ogId = _Coerce # pOgId_
, _ogProjectId = _Coerce # pOgProjectId_
}
ogProFileId :: Lens' OrdersGet Int64
ogProFileId
= lens _ogProFileId (\ s a -> s{_ogProFileId = a}) .
_Coerce
ogId :: Lens' OrdersGet Int64
ogId = lens _ogId (\ s a -> s{_ogId = a}) . _Coerce
ogProjectId :: Lens' OrdersGet Int64
ogProjectId
= lens _ogProjectId (\ s a -> s{_ogProjectId = a}) .
_Coerce
instance GoogleRequest OrdersGet where
type Rs OrdersGet = Order
type Scopes OrdersGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient OrdersGet'{..}
= go _ogProFileId _ogProjectId _ogId (Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy OrdersGetResource)
mempty