{-# 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.UpdateConfig
(
SitesUpdateConfigResource
, sitesUpdateConfig
, SitesUpdateConfig
, sucXgafv
, sucUploadProtocol
, sucUpdateMask
, sucAccessToken
, sucUploadType
, sucPayload
, sucName
, sucCallback
) where
import Network.Google.FirebaseHosting.Types
import Network.Google.Prelude
type SitesUpdateConfigResource =
"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] SiteConfig :>
Patch '[JSON] SiteConfig
data SitesUpdateConfig = SitesUpdateConfig'
{ _sucXgafv :: !(Maybe Xgafv)
, _sucUploadProtocol :: !(Maybe Text)
, _sucUpdateMask :: !(Maybe GFieldMask)
, _sucAccessToken :: !(Maybe Text)
, _sucUploadType :: !(Maybe Text)
, _sucPayload :: !SiteConfig
, _sucName :: !Text
, _sucCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
sitesUpdateConfig
:: SiteConfig
-> Text
-> SitesUpdateConfig
sitesUpdateConfig pSucPayload_ pSucName_ =
SitesUpdateConfig'
{ _sucXgafv = Nothing
, _sucUploadProtocol = Nothing
, _sucUpdateMask = Nothing
, _sucAccessToken = Nothing
, _sucUploadType = Nothing
, _sucPayload = pSucPayload_
, _sucName = pSucName_
, _sucCallback = Nothing
}
sucXgafv :: Lens' SitesUpdateConfig (Maybe Xgafv)
sucXgafv = lens _sucXgafv (\ s a -> s{_sucXgafv = a})
sucUploadProtocol :: Lens' SitesUpdateConfig (Maybe Text)
sucUploadProtocol
= lens _sucUploadProtocol
(\ s a -> s{_sucUploadProtocol = a})
sucUpdateMask :: Lens' SitesUpdateConfig (Maybe GFieldMask)
sucUpdateMask
= lens _sucUpdateMask
(\ s a -> s{_sucUpdateMask = a})
sucAccessToken :: Lens' SitesUpdateConfig (Maybe Text)
sucAccessToken
= lens _sucAccessToken
(\ s a -> s{_sucAccessToken = a})
sucUploadType :: Lens' SitesUpdateConfig (Maybe Text)
sucUploadType
= lens _sucUploadType
(\ s a -> s{_sucUploadType = a})
sucPayload :: Lens' SitesUpdateConfig SiteConfig
sucPayload
= lens _sucPayload (\ s a -> s{_sucPayload = a})
sucName :: Lens' SitesUpdateConfig Text
sucName = lens _sucName (\ s a -> s{_sucName = a})
sucCallback :: Lens' SitesUpdateConfig (Maybe Text)
sucCallback
= lens _sucCallback (\ s a -> s{_sucCallback = a})
instance GoogleRequest SitesUpdateConfig where
type Rs SitesUpdateConfig = SiteConfig
type Scopes SitesUpdateConfig =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/firebase"]
requestClient SitesUpdateConfig'{..}
= go _sucName _sucXgafv _sucUploadProtocol
_sucUpdateMask
_sucAccessToken
_sucUploadType
_sucCallback
(Just AltJSON)
_sucPayload
firebaseHostingService
where go
= buildClient
(Proxy :: Proxy SitesUpdateConfigResource)
mempty