{-# 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.Update
(
WebResourceUpdateResource
, webResourceUpdate
, WebResourceUpdate
, wruPayload
, wruId
) where
import Network.Google.Prelude
import Network.Google.SiteVerification.Types
type WebResourceUpdateResource =
"siteVerification" :>
"v1" :>
"webResource" :>
Capture "id" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SiteVerificationWebResourceResource
:> Put '[JSON] SiteVerificationWebResourceResource
data WebResourceUpdate = WebResourceUpdate'
{ _wruPayload :: !SiteVerificationWebResourceResource
, _wruId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
webResourceUpdate
:: SiteVerificationWebResourceResource
-> Text
-> WebResourceUpdate
webResourceUpdate pWruPayload_ pWruId_ =
WebResourceUpdate'
{ _wruPayload = pWruPayload_
, _wruId = pWruId_
}
wruPayload :: Lens' WebResourceUpdate SiteVerificationWebResourceResource
wruPayload
= lens _wruPayload (\ s a -> s{_wruPayload = a})
wruId :: Lens' WebResourceUpdate Text
wruId = lens _wruId (\ s a -> s{_wruId = a})
instance GoogleRequest WebResourceUpdate where
type Rs WebResourceUpdate =
SiteVerificationWebResourceResource
type Scopes WebResourceUpdate =
'["https://www.googleapis.com/auth/siteverification"]
requestClient WebResourceUpdate'{..}
= go _wruId (Just AltJSON) _wruPayload
siteVerificationService
where go
= buildClient
(Proxy :: Proxy WebResourceUpdateResource)
mempty