{-# 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.Versions.Create
(
SitesVersionsCreateResource
, sitesVersionsCreate
, SitesVersionsCreate
, svcSizeBytes
, svcParent
, svcXgafv
, svcVersionId
, svcUploadProtocol
, svcAccessToken
, svcUploadType
, svcPayload
, svcCallback
) where
import Network.Google.FirebaseHosting.Types
import Network.Google.Prelude
type SitesVersionsCreateResource =
"v1beta1" :>
Capture "parent" Text :>
"versions" :>
QueryParam "sizeBytes" (Textual Int64) :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "versionId" Text :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Version :> Post '[JSON] Version
data SitesVersionsCreate = SitesVersionsCreate'
{ _svcSizeBytes :: !(Maybe (Textual Int64))
, _svcParent :: !Text
, _svcXgafv :: !(Maybe Xgafv)
, _svcVersionId :: !(Maybe Text)
, _svcUploadProtocol :: !(Maybe Text)
, _svcAccessToken :: !(Maybe Text)
, _svcUploadType :: !(Maybe Text)
, _svcPayload :: !Version
, _svcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
sitesVersionsCreate
:: Text
-> Version
-> SitesVersionsCreate
sitesVersionsCreate pSvcParent_ pSvcPayload_ =
SitesVersionsCreate'
{ _svcSizeBytes = Nothing
, _svcParent = pSvcParent_
, _svcXgafv = Nothing
, _svcVersionId = Nothing
, _svcUploadProtocol = Nothing
, _svcAccessToken = Nothing
, _svcUploadType = Nothing
, _svcPayload = pSvcPayload_
, _svcCallback = Nothing
}
svcSizeBytes :: Lens' SitesVersionsCreate (Maybe Int64)
svcSizeBytes
= lens _svcSizeBytes (\ s a -> s{_svcSizeBytes = a})
. mapping _Coerce
svcParent :: Lens' SitesVersionsCreate Text
svcParent
= lens _svcParent (\ s a -> s{_svcParent = a})
svcXgafv :: Lens' SitesVersionsCreate (Maybe Xgafv)
svcXgafv = lens _svcXgafv (\ s a -> s{_svcXgafv = a})
svcVersionId :: Lens' SitesVersionsCreate (Maybe Text)
svcVersionId
= lens _svcVersionId (\ s a -> s{_svcVersionId = a})
svcUploadProtocol :: Lens' SitesVersionsCreate (Maybe Text)
svcUploadProtocol
= lens _svcUploadProtocol
(\ s a -> s{_svcUploadProtocol = a})
svcAccessToken :: Lens' SitesVersionsCreate (Maybe Text)
svcAccessToken
= lens _svcAccessToken
(\ s a -> s{_svcAccessToken = a})
svcUploadType :: Lens' SitesVersionsCreate (Maybe Text)
svcUploadType
= lens _svcUploadType
(\ s a -> s{_svcUploadType = a})
svcPayload :: Lens' SitesVersionsCreate Version
svcPayload
= lens _svcPayload (\ s a -> s{_svcPayload = a})
svcCallback :: Lens' SitesVersionsCreate (Maybe Text)
svcCallback
= lens _svcCallback (\ s a -> s{_svcCallback = a})
instance GoogleRequest SitesVersionsCreate where
type Rs SitesVersionsCreate = Version
type Scopes SitesVersionsCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/firebase"]
requestClient SitesVersionsCreate'{..}
= go _svcParent _svcSizeBytes _svcXgafv _svcVersionId
_svcUploadProtocol
_svcAccessToken
_svcUploadType
_svcCallback
(Just AltJSON)
_svcPayload
firebaseHostingService
where go
= buildClient
(Proxy :: Proxy SitesVersionsCreateResource)
mempty