{-# 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.CloudAsset.BatchGetAssetsHistory
(
BatchGetAssetsHistoryResource
, batchGetAssetsHistory
, BatchGetAssetsHistory
, bgahParent
, bgahXgafv
, bgahReadTimeWindowEndTime
, bgahUploadProtocol
, bgahAccessToken
, bgahUploadType
, bgahAssetNames
, bgahReadTimeWindowStartTime
, bgahContentType
, bgahCallback
) where
import Network.Google.CloudAsset.Types
import Network.Google.Prelude
type BatchGetAssetsHistoryResource =
"v1" :>
CaptureMode "parent" "batchGetAssetsHistory" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "readTimeWindow.endTime" DateTime' :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParams "assetNames" Text :>
QueryParam "readTimeWindow.startTime" DateTime' :>
QueryParam "contentType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] BatchGetAssetsHistoryResponse
data BatchGetAssetsHistory =
BatchGetAssetsHistory'
{ _bgahParent :: !Text
, _bgahXgafv :: !(Maybe Xgafv)
, _bgahReadTimeWindowEndTime :: !(Maybe DateTime')
, _bgahUploadProtocol :: !(Maybe Text)
, _bgahAccessToken :: !(Maybe Text)
, _bgahUploadType :: !(Maybe Text)
, _bgahAssetNames :: !(Maybe [Text])
, _bgahReadTimeWindowStartTime :: !(Maybe DateTime')
, _bgahContentType :: !(Maybe Text)
, _bgahCallback :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
batchGetAssetsHistory
:: Text
-> BatchGetAssetsHistory
batchGetAssetsHistory pBgahParent_ =
BatchGetAssetsHistory'
{ _bgahParent = pBgahParent_
, _bgahXgafv = Nothing
, _bgahReadTimeWindowEndTime = Nothing
, _bgahUploadProtocol = Nothing
, _bgahAccessToken = Nothing
, _bgahUploadType = Nothing
, _bgahAssetNames = Nothing
, _bgahReadTimeWindowStartTime = Nothing
, _bgahContentType = Nothing
, _bgahCallback = Nothing
}
bgahParent :: Lens' BatchGetAssetsHistory Text
bgahParent
= lens _bgahParent (\ s a -> s{_bgahParent = a})
bgahXgafv :: Lens' BatchGetAssetsHistory (Maybe Xgafv)
bgahXgafv
= lens _bgahXgafv (\ s a -> s{_bgahXgafv = a})
bgahReadTimeWindowEndTime :: Lens' BatchGetAssetsHistory (Maybe UTCTime)
bgahReadTimeWindowEndTime
= lens _bgahReadTimeWindowEndTime
(\ s a -> s{_bgahReadTimeWindowEndTime = a})
. mapping _DateTime
bgahUploadProtocol :: Lens' BatchGetAssetsHistory (Maybe Text)
bgahUploadProtocol
= lens _bgahUploadProtocol
(\ s a -> s{_bgahUploadProtocol = a})
bgahAccessToken :: Lens' BatchGetAssetsHistory (Maybe Text)
bgahAccessToken
= lens _bgahAccessToken
(\ s a -> s{_bgahAccessToken = a})
bgahUploadType :: Lens' BatchGetAssetsHistory (Maybe Text)
bgahUploadType
= lens _bgahUploadType
(\ s a -> s{_bgahUploadType = a})
bgahAssetNames :: Lens' BatchGetAssetsHistory [Text]
bgahAssetNames
= lens _bgahAssetNames
(\ s a -> s{_bgahAssetNames = a})
. _Default
. _Coerce
bgahReadTimeWindowStartTime :: Lens' BatchGetAssetsHistory (Maybe UTCTime)
bgahReadTimeWindowStartTime
= lens _bgahReadTimeWindowStartTime
(\ s a -> s{_bgahReadTimeWindowStartTime = a})
. mapping _DateTime
bgahContentType :: Lens' BatchGetAssetsHistory (Maybe Text)
bgahContentType
= lens _bgahContentType
(\ s a -> s{_bgahContentType = a})
bgahCallback :: Lens' BatchGetAssetsHistory (Maybe Text)
bgahCallback
= lens _bgahCallback (\ s a -> s{_bgahCallback = a})
instance GoogleRequest BatchGetAssetsHistory where
type Rs BatchGetAssetsHistory =
BatchGetAssetsHistoryResponse
type Scopes BatchGetAssetsHistory =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient BatchGetAssetsHistory'{..}
= go _bgahParent _bgahXgafv
_bgahReadTimeWindowEndTime
_bgahUploadProtocol
_bgahAccessToken
_bgahUploadType
(_bgahAssetNames ^. _Default)
_bgahReadTimeWindowStartTime
_bgahContentType
_bgahCallback
(Just AltJSON)
cloudAssetService
where go
= buildClient
(Proxy :: Proxy BatchGetAssetsHistoryResource)
mempty