{-# 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.Insert
(
WebResourceInsertResource
, webResourceInsert
, WebResourceInsert
, wriPayload
, wriVerificationMethod
) where
import Network.Google.Prelude
import Network.Google.SiteVerification.Types
type WebResourceInsertResource =
"siteVerification" :>
"v1" :>
"webResource" :>
QueryParam "verificationMethod" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SiteVerificationWebResourceResource
:> Post '[JSON] SiteVerificationWebResourceResource
data WebResourceInsert = WebResourceInsert'
{ _wriPayload :: !SiteVerificationWebResourceResource
, _wriVerificationMethod :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
webResourceInsert
:: SiteVerificationWebResourceResource
-> Text
-> WebResourceInsert
webResourceInsert pWriPayload_ pWriVerificationMethod_ =
WebResourceInsert'
{ _wriPayload = pWriPayload_
, _wriVerificationMethod = pWriVerificationMethod_
}
wriPayload :: Lens' WebResourceInsert SiteVerificationWebResourceResource
wriPayload
= lens _wriPayload (\ s a -> s{_wriPayload = a})
wriVerificationMethod :: Lens' WebResourceInsert Text
wriVerificationMethod
= lens _wriVerificationMethod
(\ s a -> s{_wriVerificationMethod = a})
instance GoogleRequest WebResourceInsert where
type Rs WebResourceInsert =
SiteVerificationWebResourceResource
type Scopes WebResourceInsert =
'["https://www.googleapis.com/auth/siteverification",
"https://www.googleapis.com/auth/siteverification.verify_only"]
requestClient WebResourceInsert'{..}
= go (Just _wriVerificationMethod) (Just AltJSON)
_wriPayload
siteVerificationService
where go
= buildClient
(Proxy :: Proxy WebResourceInsertResource)
mempty