{-# 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.Patch
(
AppsPatchResource
, appsPatch
, AppsPatch
, apXgafv
, apUploadProtocol
, apUpdateMask
, apAccessToken
, apUploadType
, apPayload
, apAppsId
, apCallback
) where
import Network.Google.AppEngine.Types
import Network.Google.Prelude
type AppsPatchResource =
"v1" :>
"apps" :>
Capture "appsId" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Application :>
Patch '[JSON] Operation
data AppsPatch = AppsPatch'
{ _apXgafv :: !(Maybe Xgafv)
, _apUploadProtocol :: !(Maybe Text)
, _apUpdateMask :: !(Maybe GFieldMask)
, _apAccessToken :: !(Maybe Text)
, _apUploadType :: !(Maybe Text)
, _apPayload :: !Application
, _apAppsId :: !Text
, _apCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
appsPatch
:: Application
-> Text
-> AppsPatch
appsPatch pApPayload_ pApAppsId_ =
AppsPatch'
{ _apXgafv = Nothing
, _apUploadProtocol = Nothing
, _apUpdateMask = Nothing
, _apAccessToken = Nothing
, _apUploadType = Nothing
, _apPayload = pApPayload_
, _apAppsId = pApAppsId_
, _apCallback = Nothing
}
apXgafv :: Lens' AppsPatch (Maybe Xgafv)
apXgafv = lens _apXgafv (\ s a -> s{_apXgafv = a})
apUploadProtocol :: Lens' AppsPatch (Maybe Text)
apUploadProtocol
= lens _apUploadProtocol
(\ s a -> s{_apUploadProtocol = a})
apUpdateMask :: Lens' AppsPatch (Maybe GFieldMask)
apUpdateMask
= lens _apUpdateMask (\ s a -> s{_apUpdateMask = a})
apAccessToken :: Lens' AppsPatch (Maybe Text)
apAccessToken
= lens _apAccessToken
(\ s a -> s{_apAccessToken = a})
apUploadType :: Lens' AppsPatch (Maybe Text)
apUploadType
= lens _apUploadType (\ s a -> s{_apUploadType = a})
apPayload :: Lens' AppsPatch Application
apPayload
= lens _apPayload (\ s a -> s{_apPayload = a})
apAppsId :: Lens' AppsPatch Text
apAppsId = lens _apAppsId (\ s a -> s{_apAppsId = a})
apCallback :: Lens' AppsPatch (Maybe Text)
apCallback
= lens _apCallback (\ s a -> s{_apCallback = a})
instance GoogleRequest AppsPatch where
type Rs AppsPatch = Operation
type Scopes AppsPatch =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient AppsPatch'{..}
= go _apAppsId _apXgafv _apUploadProtocol
_apUpdateMask
_apAccessToken
_apUploadType
_apCallback
(Just AltJSON)
_apPayload
appEngineService
where go
= buildClient (Proxy :: Proxy AppsPatchResource)
mempty