{-# 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.Patch
(
WebResourcePatchResource
, webResourcePatch
, WebResourcePatch
, wrpPayload
, wrpId
) where
import Network.Google.Prelude
import Network.Google.SiteVerification.Types
type WebResourcePatchResource =
"siteVerification" :>
"v1" :>
"webResource" :>
Capture "id" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SiteVerificationWebResourceResource
:> Patch '[JSON] SiteVerificationWebResourceResource
data WebResourcePatch = WebResourcePatch'
{ _wrpPayload :: !SiteVerificationWebResourceResource
, _wrpId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
webResourcePatch
:: SiteVerificationWebResourceResource
-> Text
-> WebResourcePatch
webResourcePatch pWrpPayload_ pWrpId_ =
WebResourcePatch'
{ _wrpPayload = pWrpPayload_
, _wrpId = pWrpId_
}
wrpPayload :: Lens' WebResourcePatch SiteVerificationWebResourceResource
wrpPayload
= lens _wrpPayload (\ s a -> s{_wrpPayload = a})
wrpId :: Lens' WebResourcePatch Text
wrpId = lens _wrpId (\ s a -> s{_wrpId = a})
instance GoogleRequest WebResourcePatch where
type Rs WebResourcePatch =
SiteVerificationWebResourceResource
type Scopes WebResourcePatch =
'["https://www.googleapis.com/auth/siteverification"]
requestClient WebResourcePatch'{..}
= go _wrpId (Just AltJSON) _wrpPayload
siteVerificationService
where go
= buildClient
(Proxy :: Proxy WebResourcePatchResource)
mempty