{-# 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.SiteVerification.WebResource.GetToken
(
WebResourceGetTokenResource
, webResourceGetToken
, WebResourceGetToken
, wrgtPayload
) where
import Network.Google.Prelude
import Network.Google.SiteVerification.Types
type WebResourceGetTokenResource =
"siteVerification" :>
"v1" :>
"token" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
SiteVerificationWebResourceGettokenRequest
:>
Post '[JSON]
SiteVerificationWebResourceGettokenResponse
newtype WebResourceGetToken = WebResourceGetToken'
{ _wrgtPayload :: SiteVerificationWebResourceGettokenRequest
} deriving (Eq,Show,Data,Typeable,Generic)
webResourceGetToken
:: SiteVerificationWebResourceGettokenRequest
-> WebResourceGetToken
webResourceGetToken pWrgtPayload_ =
WebResourceGetToken'
{ _wrgtPayload = pWrgtPayload_
}
wrgtPayload :: Lens' WebResourceGetToken SiteVerificationWebResourceGettokenRequest
wrgtPayload
= lens _wrgtPayload (\ s a -> s{_wrgtPayload = a})
instance GoogleRequest WebResourceGetToken where
type Rs WebResourceGetToken =
SiteVerificationWebResourceGettokenResponse
type Scopes WebResourceGetToken =
'["https://www.googleapis.com/auth/siteverification",
"https://www.googleapis.com/auth/siteverification.verify_only"]
requestClient WebResourceGetToken'{..}
= go (Just AltJSON) _wrgtPayload
siteVerificationService
where go
= buildClient
(Proxy :: Proxy WebResourceGetTokenResource)
mempty