{-# 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.Update
(
WebAppsUpdateResource
, webAppsUpdate
, WebAppsUpdate
, wauWebAppId
, wauEnterpriseId
, wauPayload
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type WebAppsUpdateResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"webApps" :>
Capture "webAppId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] WebApp :> Put '[JSON] WebApp
data WebAppsUpdate = WebAppsUpdate'
{ _wauWebAppId :: !Text
, _wauEnterpriseId :: !Text
, _wauPayload :: !WebApp
} deriving (Eq,Show,Data,Typeable,Generic)
webAppsUpdate
:: Text
-> Text
-> WebApp
-> WebAppsUpdate
webAppsUpdate pWauWebAppId_ pWauEnterpriseId_ pWauPayload_ =
WebAppsUpdate'
{ _wauWebAppId = pWauWebAppId_
, _wauEnterpriseId = pWauEnterpriseId_
, _wauPayload = pWauPayload_
}
wauWebAppId :: Lens' WebAppsUpdate Text
wauWebAppId
= lens _wauWebAppId (\ s a -> s{_wauWebAppId = a})
wauEnterpriseId :: Lens' WebAppsUpdate Text
wauEnterpriseId
= lens _wauEnterpriseId
(\ s a -> s{_wauEnterpriseId = a})
wauPayload :: Lens' WebAppsUpdate WebApp
wauPayload
= lens _wauPayload (\ s a -> s{_wauPayload = a})
instance GoogleRequest WebAppsUpdate where
type Rs WebAppsUpdate = WebApp
type Scopes WebAppsUpdate =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient WebAppsUpdate'{..}
= go _wauEnterpriseId _wauWebAppId (Just AltJSON)
_wauPayload
androidEnterpriseService
where go
= buildClient (Proxy :: Proxy WebAppsUpdateResource)
mempty