{-# 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.SafeBrowsing.ThreatListUpdates.Fetch
(
ThreatListUpdatesFetchResource
, threatListUpdatesFetch
, ThreatListUpdatesFetch
, tlufXgafv
, tlufUploadProtocol
, tlufAccessToken
, tlufUploadType
, tlufPayload
, tlufCallback
) where
import Network.Google.Prelude
import Network.Google.SafeBrowsing.Types
type ThreatListUpdatesFetchResource =
"v4" :>
"threatListUpdates:fetch" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] FetchThreatListUpdatesRequest :>
Post '[JSON] FetchThreatListUpdatesResponse
data ThreatListUpdatesFetch = ThreatListUpdatesFetch'
{ _tlufXgafv :: !(Maybe Xgafv)
, _tlufUploadProtocol :: !(Maybe Text)
, _tlufAccessToken :: !(Maybe Text)
, _tlufUploadType :: !(Maybe Text)
, _tlufPayload :: !FetchThreatListUpdatesRequest
, _tlufCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
threatListUpdatesFetch
:: FetchThreatListUpdatesRequest
-> ThreatListUpdatesFetch
threatListUpdatesFetch pTlufPayload_ =
ThreatListUpdatesFetch'
{ _tlufXgafv = Nothing
, _tlufUploadProtocol = Nothing
, _tlufAccessToken = Nothing
, _tlufUploadType = Nothing
, _tlufPayload = pTlufPayload_
, _tlufCallback = Nothing
}
tlufXgafv :: Lens' ThreatListUpdatesFetch (Maybe Xgafv)
tlufXgafv
= lens _tlufXgafv (\ s a -> s{_tlufXgafv = a})
tlufUploadProtocol :: Lens' ThreatListUpdatesFetch (Maybe Text)
tlufUploadProtocol
= lens _tlufUploadProtocol
(\ s a -> s{_tlufUploadProtocol = a})
tlufAccessToken :: Lens' ThreatListUpdatesFetch (Maybe Text)
tlufAccessToken
= lens _tlufAccessToken
(\ s a -> s{_tlufAccessToken = a})
tlufUploadType :: Lens' ThreatListUpdatesFetch (Maybe Text)
tlufUploadType
= lens _tlufUploadType
(\ s a -> s{_tlufUploadType = a})
tlufPayload :: Lens' ThreatListUpdatesFetch FetchThreatListUpdatesRequest
tlufPayload
= lens _tlufPayload (\ s a -> s{_tlufPayload = a})
tlufCallback :: Lens' ThreatListUpdatesFetch (Maybe Text)
tlufCallback
= lens _tlufCallback (\ s a -> s{_tlufCallback = a})
instance GoogleRequest ThreatListUpdatesFetch where
type Rs ThreatListUpdatesFetch =
FetchThreatListUpdatesResponse
type Scopes ThreatListUpdatesFetch = '[]
requestClient ThreatListUpdatesFetch'{..}
= go _tlufXgafv _tlufUploadProtocol _tlufAccessToken
_tlufUploadType
_tlufCallback
(Just AltJSON)
_tlufPayload
safeBrowsingService
where go
= buildClient
(Proxy :: Proxy ThreatListUpdatesFetchResource)
mempty