{-# 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.Releases.Create
(
SitesReleasesCreateResource
, sitesReleasesCreate
, SitesReleasesCreate
, srcParent
, srcXgafv
, srcUploadProtocol
, srcVersionName
, srcAccessToken
, srcUploadType
, srcPayload
, srcCallback
) where
import Network.Google.FirebaseHosting.Types
import Network.Google.Prelude
type SitesReleasesCreateResource =
"v1beta1" :>
Capture "parent" Text :>
"releases" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "versionName" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Release :> Post '[JSON] Release
data SitesReleasesCreate = SitesReleasesCreate'
{ _srcParent :: !Text
, _srcXgafv :: !(Maybe Xgafv)
, _srcUploadProtocol :: !(Maybe Text)
, _srcVersionName :: !(Maybe Text)
, _srcAccessToken :: !(Maybe Text)
, _srcUploadType :: !(Maybe Text)
, _srcPayload :: !Release
, _srcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
sitesReleasesCreate
:: Text
-> Release
-> SitesReleasesCreate
sitesReleasesCreate pSrcParent_ pSrcPayload_ =
SitesReleasesCreate'
{ _srcParent = pSrcParent_
, _srcXgafv = Nothing
, _srcUploadProtocol = Nothing
, _srcVersionName = Nothing
, _srcAccessToken = Nothing
, _srcUploadType = Nothing
, _srcPayload = pSrcPayload_
, _srcCallback = Nothing
}
srcParent :: Lens' SitesReleasesCreate Text
srcParent
= lens _srcParent (\ s a -> s{_srcParent = a})
srcXgafv :: Lens' SitesReleasesCreate (Maybe Xgafv)
srcXgafv = lens _srcXgafv (\ s a -> s{_srcXgafv = a})
srcUploadProtocol :: Lens' SitesReleasesCreate (Maybe Text)
srcUploadProtocol
= lens _srcUploadProtocol
(\ s a -> s{_srcUploadProtocol = a})
srcVersionName :: Lens' SitesReleasesCreate (Maybe Text)
srcVersionName
= lens _srcVersionName
(\ s a -> s{_srcVersionName = a})
srcAccessToken :: Lens' SitesReleasesCreate (Maybe Text)
srcAccessToken
= lens _srcAccessToken
(\ s a -> s{_srcAccessToken = a})
srcUploadType :: Lens' SitesReleasesCreate (Maybe Text)
srcUploadType
= lens _srcUploadType
(\ s a -> s{_srcUploadType = a})
srcPayload :: Lens' SitesReleasesCreate Release
srcPayload
= lens _srcPayload (\ s a -> s{_srcPayload = a})
srcCallback :: Lens' SitesReleasesCreate (Maybe Text)
srcCallback
= lens _srcCallback (\ s a -> s{_srcCallback = a})
instance GoogleRequest SitesReleasesCreate where
type Rs SitesReleasesCreate = Release
type Scopes SitesReleasesCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/firebase"]
requestClient SitesReleasesCreate'{..}
= go _srcParent _srcXgafv _srcUploadProtocol
_srcVersionName
_srcAccessToken
_srcUploadType
_srcCallback
(Just AltJSON)
_srcPayload
firebaseHostingService
where go
= buildClient
(Proxy :: Proxy SitesReleasesCreateResource)
mempty