{-# 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.ThreatMatches.Find
(
ThreatMatchesFindResource
, threatMatchesFind
, ThreatMatchesFind
, tmfXgafv
, tmfUploadProtocol
, tmfAccessToken
, tmfUploadType
, tmfPayload
, tmfCallback
) where
import Network.Google.Prelude
import Network.Google.SafeBrowsing.Types
type ThreatMatchesFindResource =
"v4" :>
"threatMatches:find" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] FindThreatMatchesRequest :>
Post '[JSON] FindThreatMatchesResponse
data ThreatMatchesFind = ThreatMatchesFind'
{ _tmfXgafv :: !(Maybe Xgafv)
, _tmfUploadProtocol :: !(Maybe Text)
, _tmfAccessToken :: !(Maybe Text)
, _tmfUploadType :: !(Maybe Text)
, _tmfPayload :: !FindThreatMatchesRequest
, _tmfCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
threatMatchesFind
:: FindThreatMatchesRequest
-> ThreatMatchesFind
threatMatchesFind pTmfPayload_ =
ThreatMatchesFind'
{ _tmfXgafv = Nothing
, _tmfUploadProtocol = Nothing
, _tmfAccessToken = Nothing
, _tmfUploadType = Nothing
, _tmfPayload = pTmfPayload_
, _tmfCallback = Nothing
}
tmfXgafv :: Lens' ThreatMatchesFind (Maybe Xgafv)
tmfXgafv = lens _tmfXgafv (\ s a -> s{_tmfXgafv = a})
tmfUploadProtocol :: Lens' ThreatMatchesFind (Maybe Text)
tmfUploadProtocol
= lens _tmfUploadProtocol
(\ s a -> s{_tmfUploadProtocol = a})
tmfAccessToken :: Lens' ThreatMatchesFind (Maybe Text)
tmfAccessToken
= lens _tmfAccessToken
(\ s a -> s{_tmfAccessToken = a})
tmfUploadType :: Lens' ThreatMatchesFind (Maybe Text)
tmfUploadType
= lens _tmfUploadType
(\ s a -> s{_tmfUploadType = a})
tmfPayload :: Lens' ThreatMatchesFind FindThreatMatchesRequest
tmfPayload
= lens _tmfPayload (\ s a -> s{_tmfPayload = a})
tmfCallback :: Lens' ThreatMatchesFind (Maybe Text)
tmfCallback
= lens _tmfCallback (\ s a -> s{_tmfCallback = a})
instance GoogleRequest ThreatMatchesFind where
type Rs ThreatMatchesFind = FindThreatMatchesResponse
type Scopes ThreatMatchesFind = '[]
requestClient ThreatMatchesFind'{..}
= go _tmfXgafv _tmfUploadProtocol _tmfAccessToken
_tmfUploadType
_tmfCallback
(Just AltJSON)
_tmfPayload
safeBrowsingService
where go
= buildClient
(Proxy :: Proxy ThreatMatchesFindResource)
mempty