{-# 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.FullHashes.Find
(
FullHashesFindResource
, fullHashesFind
, FullHashesFind
, fhfXgafv
, fhfUploadProtocol
, fhfPp
, fhfAccessToken
, fhfUploadType
, fhfPayload
, fhfBearerToken
, fhfCallback
) where
import Network.Google.Prelude
import Network.Google.SafeBrowsing.Types
type FullHashesFindResource =
"v4" :>
"fullHashes:find" :>
QueryParam "$.xgafv" Text :>
QueryParam "upload_protocol" Text :>
QueryParam "pp" Bool :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "bearer_token" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] FindFullHashesRequest :>
Post '[JSON] FindFullHashesResponse
-- | Finds the full hashes that match the requested hash prefixes.
--
-- /See:/ 'fullHashesFind' smart constructor.
data FullHashesFind = FullHashesFind'
{ _fhfXgafv :: !(Maybe Text)
, _fhfUploadProtocol :: !(Maybe Text)
, _fhfPp :: !Bool
, _fhfAccessToken :: !(Maybe Text)
, _fhfUploadType :: !(Maybe Text)
, _fhfPayload :: !FindFullHashesRequest
, _fhfBearerToken :: !(Maybe Text)
, _fhfCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'FullHashesFind' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'fhfXgafv'
--
-- * 'fhfUploadProtocol'
--
-- * 'fhfPp'
--
-- * 'fhfAccessToken'
--
-- * 'fhfUploadType'
--
-- * 'fhfPayload'
--
-- * 'fhfBearerToken'
--
-- * 'fhfCallback'
fullHashesFind
:: FindFullHashesRequest -- ^ 'fhfPayload'
-> FullHashesFind
fullHashesFind pFhfPayload_ =
FullHashesFind'
{ _fhfXgafv = Nothing
, _fhfUploadProtocol = Nothing
, _fhfPp = True
, _fhfAccessToken = Nothing
, _fhfUploadType = Nothing
, _fhfPayload = pFhfPayload_
, _fhfBearerToken = Nothing
, _fhfCallback = Nothing
}
-- | V1 error format.
fhfXgafv :: Lens' FullHashesFind (Maybe Text)
fhfXgafv = lens _fhfXgafv (\ s a -> s{_fhfXgafv = a})
-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
fhfUploadProtocol :: Lens' FullHashesFind (Maybe Text)
fhfUploadProtocol
= lens _fhfUploadProtocol
(\ s a -> s{_fhfUploadProtocol = a})
-- | Pretty-print response.
fhfPp :: Lens' FullHashesFind Bool
fhfPp = lens _fhfPp (\ s a -> s{_fhfPp = a})
-- | OAuth access token.
fhfAccessToken :: Lens' FullHashesFind (Maybe Text)
fhfAccessToken
= lens _fhfAccessToken
(\ s a -> s{_fhfAccessToken = a})
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
fhfUploadType :: Lens' FullHashesFind (Maybe Text)
fhfUploadType
= lens _fhfUploadType
(\ s a -> s{_fhfUploadType = a})
-- | Multipart request metadata.
fhfPayload :: Lens' FullHashesFind FindFullHashesRequest
fhfPayload
= lens _fhfPayload (\ s a -> s{_fhfPayload = a})
-- | OAuth bearer token.
fhfBearerToken :: Lens' FullHashesFind (Maybe Text)
fhfBearerToken
= lens _fhfBearerToken
(\ s a -> s{_fhfBearerToken = a})
-- | JSONP
fhfCallback :: Lens' FullHashesFind (Maybe Text)
fhfCallback
= lens _fhfCallback (\ s a -> s{_fhfCallback = a})
instance GoogleRequest FullHashesFind where
type Rs FullHashesFind = FindFullHashesResponse
type Scopes FullHashesFind = '[]
requestClient FullHashesFind'{..}
= go _fhfXgafv _fhfUploadProtocol (Just _fhfPp)
_fhfAccessToken
_fhfUploadType
_fhfBearerToken
_fhfCallback
(Just AltJSON)
_fhfPayload
safeBrowsingService
where go
= buildClient (Proxy :: Proxy FullHashesFindResource)
mempty