{-# 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.FirebaseHosting.Sites.Versions.Patch
(
SitesVersionsPatchResource
, sitesVersionsPatch
, SitesVersionsPatch
, svpXgafv
, svpUploadProtocol
, svpUpdateMask
, svpAccessToken
, svpUploadType
, svpPayload
, svpName
, svpCallback
) where
import Network.Google.FirebaseHosting.Types
import Network.Google.Prelude
type SitesVersionsPatchResource =
"v1beta1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Version :> Patch '[JSON] Version
data SitesVersionsPatch = SitesVersionsPatch'
{ _svpXgafv :: !(Maybe Xgafv)
, _svpUploadProtocol :: !(Maybe Text)
, _svpUpdateMask :: !(Maybe GFieldMask)
, _svpAccessToken :: !(Maybe Text)
, _svpUploadType :: !(Maybe Text)
, _svpPayload :: !Version
, _svpName :: !Text
, _svpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
sitesVersionsPatch
:: Version
-> Text
-> SitesVersionsPatch
sitesVersionsPatch pSvpPayload_ pSvpName_ =
SitesVersionsPatch'
{ _svpXgafv = Nothing
, _svpUploadProtocol = Nothing
, _svpUpdateMask = Nothing
, _svpAccessToken = Nothing
, _svpUploadType = Nothing
, _svpPayload = pSvpPayload_
, _svpName = pSvpName_
, _svpCallback = Nothing
}
svpXgafv :: Lens' SitesVersionsPatch (Maybe Xgafv)
svpXgafv = lens _svpXgafv (\ s a -> s{_svpXgafv = a})
svpUploadProtocol :: Lens' SitesVersionsPatch (Maybe Text)
svpUploadProtocol
= lens _svpUploadProtocol
(\ s a -> s{_svpUploadProtocol = a})
svpUpdateMask :: Lens' SitesVersionsPatch (Maybe GFieldMask)
svpUpdateMask
= lens _svpUpdateMask
(\ s a -> s{_svpUpdateMask = a})
svpAccessToken :: Lens' SitesVersionsPatch (Maybe Text)
svpAccessToken
= lens _svpAccessToken
(\ s a -> s{_svpAccessToken = a})
svpUploadType :: Lens' SitesVersionsPatch (Maybe Text)
svpUploadType
= lens _svpUploadType
(\ s a -> s{_svpUploadType = a})
svpPayload :: Lens' SitesVersionsPatch Version
svpPayload
= lens _svpPayload (\ s a -> s{_svpPayload = a})
svpName :: Lens' SitesVersionsPatch Text
svpName = lens _svpName (\ s a -> s{_svpName = a})
svpCallback :: Lens' SitesVersionsPatch (Maybe Text)
svpCallback
= lens _svpCallback (\ s a -> s{_svpCallback = a})
instance GoogleRequest SitesVersionsPatch where
type Rs SitesVersionsPatch = Version
type Scopes SitesVersionsPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/firebase"]
requestClient SitesVersionsPatch'{..}
= go _svpName _svpXgafv _svpUploadProtocol
_svpUpdateMask
_svpAccessToken
_svpUploadType
_svpCallback
(Just AltJSON)
_svpPayload
firebaseHostingService
where go
= buildClient
(Proxy :: Proxy SitesVersionsPatchResource)
mempty