{-# 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.Create
(
SitesDomainsCreateResource
, sitesDomainsCreate
, SitesDomainsCreate
, sdcParent
, sdcXgafv
, sdcUploadProtocol
, sdcAccessToken
, sdcUploadType
, sdcPayload
, sdcCallback
) where
import Network.Google.FirebaseHosting.Types
import Network.Google.Prelude
type SitesDomainsCreateResource =
"v1beta1" :>
Capture "parent" Text :>
"domains" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Domain :> Post '[JSON] Domain
data SitesDomainsCreate = SitesDomainsCreate'
{ _sdcParent :: !Text
, _sdcXgafv :: !(Maybe Xgafv)
, _sdcUploadProtocol :: !(Maybe Text)
, _sdcAccessToken :: !(Maybe Text)
, _sdcUploadType :: !(Maybe Text)
, _sdcPayload :: !Domain
, _sdcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
sitesDomainsCreate
:: Text
-> Domain
-> SitesDomainsCreate
sitesDomainsCreate pSdcParent_ pSdcPayload_ =
SitesDomainsCreate'
{ _sdcParent = pSdcParent_
, _sdcXgafv = Nothing
, _sdcUploadProtocol = Nothing
, _sdcAccessToken = Nothing
, _sdcUploadType = Nothing
, _sdcPayload = pSdcPayload_
, _sdcCallback = Nothing
}
sdcParent :: Lens' SitesDomainsCreate Text
sdcParent
= lens _sdcParent (\ s a -> s{_sdcParent = a})
sdcXgafv :: Lens' SitesDomainsCreate (Maybe Xgafv)
sdcXgafv = lens _sdcXgafv (\ s a -> s{_sdcXgafv = a})
sdcUploadProtocol :: Lens' SitesDomainsCreate (Maybe Text)
sdcUploadProtocol
= lens _sdcUploadProtocol
(\ s a -> s{_sdcUploadProtocol = a})
sdcAccessToken :: Lens' SitesDomainsCreate (Maybe Text)
sdcAccessToken
= lens _sdcAccessToken
(\ s a -> s{_sdcAccessToken = a})
sdcUploadType :: Lens' SitesDomainsCreate (Maybe Text)
sdcUploadType
= lens _sdcUploadType
(\ s a -> s{_sdcUploadType = a})
sdcPayload :: Lens' SitesDomainsCreate Domain
sdcPayload
= lens _sdcPayload (\ s a -> s{_sdcPayload = a})
sdcCallback :: Lens' SitesDomainsCreate (Maybe Text)
sdcCallback
= lens _sdcCallback (\ s a -> s{_sdcCallback = a})
instance GoogleRequest SitesDomainsCreate where
type Rs SitesDomainsCreate = Domain
type Scopes SitesDomainsCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/firebase"]
requestClient SitesDomainsCreate'{..}
= go _sdcParent _sdcXgafv _sdcUploadProtocol
_sdcAccessToken
_sdcUploadType
_sdcCallback
(Just AltJSON)
_sdcPayload
firebaseHostingService
where go
= buildClient
(Proxy :: Proxy SitesDomainsCreateResource)
mempty