{-# 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.DataTransfer.Transfers.Get
(
TransfersGetResource
, transfersGet
, TransfersGet
, tgDataTransferId
) where
import Network.Google.DataTransfer.Types
import Network.Google.Prelude
type TransfersGetResource =
"admin" :>
"datatransfer" :>
"v1" :>
"transfers" :>
Capture "dataTransferId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] DataTransfer
newtype TransfersGet = TransfersGet'
{ _tgDataTransferId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
transfersGet
:: Text
-> TransfersGet
transfersGet pTgDataTransferId_ =
TransfersGet'
{ _tgDataTransferId = pTgDataTransferId_
}
tgDataTransferId :: Lens' TransfersGet Text
tgDataTransferId
= lens _tgDataTransferId
(\ s a -> s{_tgDataTransferId = a})
instance GoogleRequest TransfersGet where
type Rs TransfersGet = DataTransfer
type Scopes TransfersGet =
'["https://www.googleapis.com/auth/admin.datatransfer",
"https://www.googleapis.com/auth/admin.datatransfer.readonly"]
requestClient TransfersGet'{..}
= go _tgDataTransferId (Just AltJSON)
dataTransferService
where go
= buildClient (Proxy :: Proxy TransfersGetResource)
mempty