{-# 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.List
(
TransfersListResource
, transfersList
, TransfersList
, tlStatus
, tlOldOwnerUserId
, tlNewOwnerUserId
, tlCustomerId
, tlPageToken
, tlMaxResults
) where
import Network.Google.DataTransfer.Types
import Network.Google.Prelude
type TransfersListResource =
"admin" :>
"datatransfer" :>
"v1" :>
"transfers" :>
QueryParam "status" Text :>
QueryParam "oldOwnerUserId" Text :>
QueryParam "newOwnerUserId" Text :>
QueryParam "customerId" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] DataTransfersListResponse
data TransfersList = TransfersList'
{ _tlStatus :: !(Maybe Text)
, _tlOldOwnerUserId :: !(Maybe Text)
, _tlNewOwnerUserId :: !(Maybe Text)
, _tlCustomerId :: !(Maybe Text)
, _tlPageToken :: !(Maybe Text)
, _tlMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
transfersList
:: TransfersList
transfersList =
TransfersList'
{ _tlStatus = Nothing
, _tlOldOwnerUserId = Nothing
, _tlNewOwnerUserId = Nothing
, _tlCustomerId = Nothing
, _tlPageToken = Nothing
, _tlMaxResults = Nothing
}
tlStatus :: Lens' TransfersList (Maybe Text)
tlStatus = lens _tlStatus (\ s a -> s{_tlStatus = a})
tlOldOwnerUserId :: Lens' TransfersList (Maybe Text)
tlOldOwnerUserId
= lens _tlOldOwnerUserId
(\ s a -> s{_tlOldOwnerUserId = a})
tlNewOwnerUserId :: Lens' TransfersList (Maybe Text)
tlNewOwnerUserId
= lens _tlNewOwnerUserId
(\ s a -> s{_tlNewOwnerUserId = a})
tlCustomerId :: Lens' TransfersList (Maybe Text)
tlCustomerId
= lens _tlCustomerId (\ s a -> s{_tlCustomerId = a})
tlPageToken :: Lens' TransfersList (Maybe Text)
tlPageToken
= lens _tlPageToken (\ s a -> s{_tlPageToken = a})
tlMaxResults :: Lens' TransfersList (Maybe Int32)
tlMaxResults
= lens _tlMaxResults (\ s a -> s{_tlMaxResults = a})
. mapping _Coerce
instance GoogleRequest TransfersList where
type Rs TransfersList = DataTransfersListResponse
type Scopes TransfersList =
'["https://www.googleapis.com/auth/admin.datatransfer",
"https://www.googleapis.com/auth/admin.datatransfer.readonly"]
requestClient TransfersList'{..}
= go _tlStatus _tlOldOwnerUserId _tlNewOwnerUserId
_tlCustomerId
_tlPageToken
_tlMaxResults
(Just AltJSON)
dataTransferService
where go
= buildClient (Proxy :: Proxy TransfersListResource)
mempty