{-# 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.AppEngine.Apps.Create
(
AppsCreateResource
, appsCreate
, AppsCreate
, acXgafv
, acUploadProtocol
, acAccessToken
, acUploadType
, acPayload
, acCallback
) where
import Network.Google.AppEngine.Types
import Network.Google.Prelude
type AppsCreateResource =
"v1" :>
"apps" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Application :> Post '[JSON] Operation
data AppsCreate = AppsCreate'
{ _acXgafv :: !(Maybe Xgafv)
, _acUploadProtocol :: !(Maybe Text)
, _acAccessToken :: !(Maybe Text)
, _acUploadType :: !(Maybe Text)
, _acPayload :: !Application
, _acCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
appsCreate
:: Application
-> AppsCreate
appsCreate pAcPayload_ =
AppsCreate'
{ _acXgafv = Nothing
, _acUploadProtocol = Nothing
, _acAccessToken = Nothing
, _acUploadType = Nothing
, _acPayload = pAcPayload_
, _acCallback = Nothing
}
acXgafv :: Lens' AppsCreate (Maybe Xgafv)
acXgafv = lens _acXgafv (\ s a -> s{_acXgafv = a})
acUploadProtocol :: Lens' AppsCreate (Maybe Text)
acUploadProtocol
= lens _acUploadProtocol
(\ s a -> s{_acUploadProtocol = a})
acAccessToken :: Lens' AppsCreate (Maybe Text)
acAccessToken
= lens _acAccessToken
(\ s a -> s{_acAccessToken = a})
acUploadType :: Lens' AppsCreate (Maybe Text)
acUploadType
= lens _acUploadType (\ s a -> s{_acUploadType = a})
acPayload :: Lens' AppsCreate Application
acPayload
= lens _acPayload (\ s a -> s{_acPayload = a})
acCallback :: Lens' AppsCreate (Maybe Text)
acCallback
= lens _acCallback (\ s a -> s{_acCallback = a})
instance GoogleRequest AppsCreate where
type Rs AppsCreate = Operation
type Scopes AppsCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient AppsCreate'{..}
= go _acXgafv _acUploadProtocol _acAccessToken
_acUploadType
_acCallback
(Just AltJSON)
_acPayload
appEngineService
where go
= buildClient (Proxy :: Proxy AppsCreateResource)
mempty