{-# 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.Insert
(
TransfersInsertResource
, transfersInsert
, TransfersInsert
, tiPayload
) where
import Network.Google.DataTransfer.Types
import Network.Google.Prelude
type TransfersInsertResource =
"admin" :>
"datatransfer" :>
"v1" :>
"transfers" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] DataTransfer :>
Post '[JSON] DataTransfer
newtype TransfersInsert = TransfersInsert'
{ _tiPayload :: DataTransfer
} deriving (Eq,Show,Data,Typeable,Generic)
transfersInsert
:: DataTransfer
-> TransfersInsert
transfersInsert pTiPayload_ =
TransfersInsert'
{ _tiPayload = pTiPayload_
}
tiPayload :: Lens' TransfersInsert DataTransfer
tiPayload
= lens _tiPayload (\ s a -> s{_tiPayload = a})
instance GoogleRequest TransfersInsert where
type Rs TransfersInsert = DataTransfer
type Scopes TransfersInsert =
'["https://www.googleapis.com/auth/admin.datatransfer"]
requestClient TransfersInsert'{..}
= go (Just AltJSON) _tiPayload dataTransferService
where go
= buildClient
(Proxy :: Proxy TransfersInsertResource)
mempty