{-# 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.AndroidManagement.Enterprises.WebApps.Patch
(
EnterprisesWebAppsPatchResource
, enterprisesWebAppsPatch
, EnterprisesWebAppsPatch
, ewapXgafv
, ewapUploadProtocol
, ewapUpdateMask
, ewapAccessToken
, ewapUploadType
, ewapPayload
, ewapName
, ewapCallback
) where
import Network.Google.AndroidManagement.Types
import Network.Google.Prelude
type EnterprisesWebAppsPatchResource =
"v1" :>
Capture "name" 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] WebApp :> Patch '[JSON] WebApp
data EnterprisesWebAppsPatch =
EnterprisesWebAppsPatch'
{ _ewapXgafv :: !(Maybe Xgafv)
, _ewapUploadProtocol :: !(Maybe Text)
, _ewapUpdateMask :: !(Maybe GFieldMask)
, _ewapAccessToken :: !(Maybe Text)
, _ewapUploadType :: !(Maybe Text)
, _ewapPayload :: !WebApp
, _ewapName :: !Text
, _ewapCallback :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
enterprisesWebAppsPatch
:: WebApp
-> Text
-> EnterprisesWebAppsPatch
enterprisesWebAppsPatch pEwapPayload_ pEwapName_ =
EnterprisesWebAppsPatch'
{ _ewapXgafv = Nothing
, _ewapUploadProtocol = Nothing
, _ewapUpdateMask = Nothing
, _ewapAccessToken = Nothing
, _ewapUploadType = Nothing
, _ewapPayload = pEwapPayload_
, _ewapName = pEwapName_
, _ewapCallback = Nothing
}
ewapXgafv :: Lens' EnterprisesWebAppsPatch (Maybe Xgafv)
ewapXgafv
= lens _ewapXgafv (\ s a -> s{_ewapXgafv = a})
ewapUploadProtocol :: Lens' EnterprisesWebAppsPatch (Maybe Text)
ewapUploadProtocol
= lens _ewapUploadProtocol
(\ s a -> s{_ewapUploadProtocol = a})
ewapUpdateMask :: Lens' EnterprisesWebAppsPatch (Maybe GFieldMask)
ewapUpdateMask
= lens _ewapUpdateMask
(\ s a -> s{_ewapUpdateMask = a})
ewapAccessToken :: Lens' EnterprisesWebAppsPatch (Maybe Text)
ewapAccessToken
= lens _ewapAccessToken
(\ s a -> s{_ewapAccessToken = a})
ewapUploadType :: Lens' EnterprisesWebAppsPatch (Maybe Text)
ewapUploadType
= lens _ewapUploadType
(\ s a -> s{_ewapUploadType = a})
ewapPayload :: Lens' EnterprisesWebAppsPatch WebApp
ewapPayload
= lens _ewapPayload (\ s a -> s{_ewapPayload = a})
ewapName :: Lens' EnterprisesWebAppsPatch Text
ewapName = lens _ewapName (\ s a -> s{_ewapName = a})
ewapCallback :: Lens' EnterprisesWebAppsPatch (Maybe Text)
ewapCallback
= lens _ewapCallback (\ s a -> s{_ewapCallback = a})
instance GoogleRequest EnterprisesWebAppsPatch where
type Rs EnterprisesWebAppsPatch = WebApp
type Scopes EnterprisesWebAppsPatch =
'["https://www.googleapis.com/auth/androidmanagement"]
requestClient EnterprisesWebAppsPatch'{..}
= go _ewapName _ewapXgafv _ewapUploadProtocol
_ewapUpdateMask
_ewapAccessToken
_ewapUploadType
_ewapCallback
(Just AltJSON)
_ewapPayload
androidManagementService
where go
= buildClient
(Proxy :: Proxy EnterprisesWebAppsPatchResource)
mempty