{-# 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.EncodedUpdates.Get
(
EncodedUpdatesGetResource
, encodedUpdatesGet
, EncodedUpdatesGet
, eugClientId
, eugXgafv
, eugUploadProtocol
, eugAccessToken
, eugEncodedRequest
, eugUploadType
, eugClientVersion
, eugCallback
) where
import Network.Google.Prelude
import Network.Google.SafeBrowsing.Types
type EncodedUpdatesGetResource =
"v4" :>
"encodedUpdates" :>
Capture "encodedRequest" Bytes :>
QueryParam "clientId" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "clientVersion" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] FetchThreatListUpdatesResponse
data EncodedUpdatesGet = EncodedUpdatesGet'
{ _eugClientId :: !(Maybe Text)
, _eugXgafv :: !(Maybe Xgafv)
, _eugUploadProtocol :: !(Maybe Text)
, _eugAccessToken :: !(Maybe Text)
, _eugEncodedRequest :: !Bytes
, _eugUploadType :: !(Maybe Text)
, _eugClientVersion :: !(Maybe Text)
, _eugCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
encodedUpdatesGet
:: ByteString
-> EncodedUpdatesGet
encodedUpdatesGet pEugEncodedRequest_ =
EncodedUpdatesGet'
{ _eugClientId = Nothing
, _eugXgafv = Nothing
, _eugUploadProtocol = Nothing
, _eugAccessToken = Nothing
, _eugEncodedRequest = _Bytes # pEugEncodedRequest_
, _eugUploadType = Nothing
, _eugClientVersion = Nothing
, _eugCallback = Nothing
}
eugClientId :: Lens' EncodedUpdatesGet (Maybe Text)
eugClientId
= lens _eugClientId (\ s a -> s{_eugClientId = a})
eugXgafv :: Lens' EncodedUpdatesGet (Maybe Xgafv)
eugXgafv = lens _eugXgafv (\ s a -> s{_eugXgafv = a})
eugUploadProtocol :: Lens' EncodedUpdatesGet (Maybe Text)
eugUploadProtocol
= lens _eugUploadProtocol
(\ s a -> s{_eugUploadProtocol = a})
eugAccessToken :: Lens' EncodedUpdatesGet (Maybe Text)
eugAccessToken
= lens _eugAccessToken
(\ s a -> s{_eugAccessToken = a})
eugEncodedRequest :: Lens' EncodedUpdatesGet ByteString
eugEncodedRequest
= lens _eugEncodedRequest
(\ s a -> s{_eugEncodedRequest = a})
. _Bytes
eugUploadType :: Lens' EncodedUpdatesGet (Maybe Text)
eugUploadType
= lens _eugUploadType
(\ s a -> s{_eugUploadType = a})
eugClientVersion :: Lens' EncodedUpdatesGet (Maybe Text)
eugClientVersion
= lens _eugClientVersion
(\ s a -> s{_eugClientVersion = a})
eugCallback :: Lens' EncodedUpdatesGet (Maybe Text)
eugCallback
= lens _eugCallback (\ s a -> s{_eugCallback = a})
instance GoogleRequest EncodedUpdatesGet where
type Rs EncodedUpdatesGet =
FetchThreatListUpdatesResponse
type Scopes EncodedUpdatesGet = '[]
requestClient EncodedUpdatesGet'{..}
= go _eugEncodedRequest _eugClientId _eugXgafv
_eugUploadProtocol
_eugAccessToken
_eugUploadType
_eugClientVersion
_eugCallback
(Just AltJSON)
safeBrowsingService
where go
= buildClient
(Proxy :: Proxy EncodedUpdatesGetResource)
mempty