{-# 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.Domains.Update
(
SitesDomainsUpdateResource
, sitesDomainsUpdate
, SitesDomainsUpdate
, sduXgafv
, sduUploadProtocol
, sduAccessToken
, sduUploadType
, sduPayload
, sduName
, sduCallback
) where
import Network.Google.FirebaseHosting.Types
import Network.Google.Prelude
type SitesDomainsUpdateResource =
"v1beta1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Domain :> Put '[JSON] Domain
data SitesDomainsUpdate = SitesDomainsUpdate'
{ _sduXgafv :: !(Maybe Xgafv)
, _sduUploadProtocol :: !(Maybe Text)
, _sduAccessToken :: !(Maybe Text)
, _sduUploadType :: !(Maybe Text)
, _sduPayload :: !Domain
, _sduName :: !Text
, _sduCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
sitesDomainsUpdate
:: Domain
-> Text
-> SitesDomainsUpdate
sitesDomainsUpdate pSduPayload_ pSduName_ =
SitesDomainsUpdate'
{ _sduXgafv = Nothing
, _sduUploadProtocol = Nothing
, _sduAccessToken = Nothing
, _sduUploadType = Nothing
, _sduPayload = pSduPayload_
, _sduName = pSduName_
, _sduCallback = Nothing
}
sduXgafv :: Lens' SitesDomainsUpdate (Maybe Xgafv)
sduXgafv = lens _sduXgafv (\ s a -> s{_sduXgafv = a})
sduUploadProtocol :: Lens' SitesDomainsUpdate (Maybe Text)
sduUploadProtocol
= lens _sduUploadProtocol
(\ s a -> s{_sduUploadProtocol = a})
sduAccessToken :: Lens' SitesDomainsUpdate (Maybe Text)
sduAccessToken
= lens _sduAccessToken
(\ s a -> s{_sduAccessToken = a})
sduUploadType :: Lens' SitesDomainsUpdate (Maybe Text)
sduUploadType
= lens _sduUploadType
(\ s a -> s{_sduUploadType = a})
sduPayload :: Lens' SitesDomainsUpdate Domain
sduPayload
= lens _sduPayload (\ s a -> s{_sduPayload = a})
sduName :: Lens' SitesDomainsUpdate Text
sduName = lens _sduName (\ s a -> s{_sduName = a})
sduCallback :: Lens' SitesDomainsUpdate (Maybe Text)
sduCallback
= lens _sduCallback (\ s a -> s{_sduCallback = a})
instance GoogleRequest SitesDomainsUpdate where
type Rs SitesDomainsUpdate = Domain
type Scopes SitesDomainsUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/firebase"]
requestClient SitesDomainsUpdate'{..}
= go _sduName _sduXgafv _sduUploadProtocol
_sduAccessToken
_sduUploadType
_sduCallback
(Just AltJSON)
_sduPayload
firebaseHostingService
where go
= buildClient
(Proxy :: Proxy SitesDomainsUpdateResource)
mempty