{-# 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.GetConfig
(
SitesGetConfigResource
, sitesGetConfig
, SitesGetConfig
, sgcXgafv
, sgcUploadProtocol
, sgcAccessToken
, sgcUploadType
, sgcName
, sgcCallback
) where
import Network.Google.FirebaseHosting.Types
import Network.Google.Prelude
type SitesGetConfigResource =
"v1beta1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] SiteConfig
data SitesGetConfig = SitesGetConfig'
{ _sgcXgafv :: !(Maybe Xgafv)
, _sgcUploadProtocol :: !(Maybe Text)
, _sgcAccessToken :: !(Maybe Text)
, _sgcUploadType :: !(Maybe Text)
, _sgcName :: !Text
, _sgcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
sitesGetConfig
:: Text
-> SitesGetConfig
sitesGetConfig pSgcName_ =
SitesGetConfig'
{ _sgcXgafv = Nothing
, _sgcUploadProtocol = Nothing
, _sgcAccessToken = Nothing
, _sgcUploadType = Nothing
, _sgcName = pSgcName_
, _sgcCallback = Nothing
}
sgcXgafv :: Lens' SitesGetConfig (Maybe Xgafv)
sgcXgafv = lens _sgcXgafv (\ s a -> s{_sgcXgafv = a})
sgcUploadProtocol :: Lens' SitesGetConfig (Maybe Text)
sgcUploadProtocol
= lens _sgcUploadProtocol
(\ s a -> s{_sgcUploadProtocol = a})
sgcAccessToken :: Lens' SitesGetConfig (Maybe Text)
sgcAccessToken
= lens _sgcAccessToken
(\ s a -> s{_sgcAccessToken = a})
sgcUploadType :: Lens' SitesGetConfig (Maybe Text)
sgcUploadType
= lens _sgcUploadType
(\ s a -> s{_sgcUploadType = a})
sgcName :: Lens' SitesGetConfig Text
sgcName = lens _sgcName (\ s a -> s{_sgcName = a})
sgcCallback :: Lens' SitesGetConfig (Maybe Text)
sgcCallback
= lens _sgcCallback (\ s a -> s{_sgcCallback = a})
instance GoogleRequest SitesGetConfig where
type Rs SitesGetConfig = SiteConfig
type Scopes SitesGetConfig =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only",
"https://www.googleapis.com/auth/firebase",
"https://www.googleapis.com/auth/firebase.readonly"]
requestClient SitesGetConfig'{..}
= go _sgcName _sgcXgafv _sgcUploadProtocol
_sgcAccessToken
_sgcUploadType
_sgcCallback
(Just AltJSON)
firebaseHostingService
where go
= buildClient (Proxy :: Proxy SitesGetConfigResource)
mempty