{-# 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.AndroidEnterprise.WebApps.Patch
(
WebAppsPatchResource
, webAppsPatch
, WebAppsPatch
, wapWebAppId
, wapEnterpriseId
, wapPayload
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type WebAppsPatchResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"webApps" :>
Capture "webAppId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] WebApp :> Patch '[JSON] WebApp
data WebAppsPatch = WebAppsPatch'
{ _wapWebAppId :: !Text
, _wapEnterpriseId :: !Text
, _wapPayload :: !WebApp
} deriving (Eq,Show,Data,Typeable,Generic)
webAppsPatch
:: Text
-> Text
-> WebApp
-> WebAppsPatch
webAppsPatch pWapWebAppId_ pWapEnterpriseId_ pWapPayload_ =
WebAppsPatch'
{ _wapWebAppId = pWapWebAppId_
, _wapEnterpriseId = pWapEnterpriseId_
, _wapPayload = pWapPayload_
}
wapWebAppId :: Lens' WebAppsPatch Text
wapWebAppId
= lens _wapWebAppId (\ s a -> s{_wapWebAppId = a})
wapEnterpriseId :: Lens' WebAppsPatch Text
wapEnterpriseId
= lens _wapEnterpriseId
(\ s a -> s{_wapEnterpriseId = a})
wapPayload :: Lens' WebAppsPatch WebApp
wapPayload
= lens _wapPayload (\ s a -> s{_wapPayload = a})
instance GoogleRequest WebAppsPatch where
type Rs WebAppsPatch = WebApp
type Scopes WebAppsPatch =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient WebAppsPatch'{..}
= go _wapEnterpriseId _wapWebAppId (Just AltJSON)
_wapPayload
androidEnterpriseService
where go
= buildClient (Proxy :: Proxy WebAppsPatchResource)
mempty