{-# 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.Patch
(
EnterprisesPatchResource
, enterprisesPatch
, EnterprisesPatch
, epXgafv
, epUploadProtocol
, epUpdateMask
, epAccessToken
, epUploadType
, epPayload
, epName
, epCallback
) where
import Network.Google.AndroidManagement.Types
import Network.Google.Prelude
type EnterprisesPatchResource =
"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] Enterprise :>
Patch '[JSON] Enterprise
data EnterprisesPatch = EnterprisesPatch'
{ _epXgafv :: !(Maybe Xgafv)
, _epUploadProtocol :: !(Maybe Text)
, _epUpdateMask :: !(Maybe GFieldMask)
, _epAccessToken :: !(Maybe Text)
, _epUploadType :: !(Maybe Text)
, _epPayload :: !Enterprise
, _epName :: !Text
, _epCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
enterprisesPatch
:: Enterprise
-> Text
-> EnterprisesPatch
enterprisesPatch pEpPayload_ pEpName_ =
EnterprisesPatch'
{ _epXgafv = Nothing
, _epUploadProtocol = Nothing
, _epUpdateMask = Nothing
, _epAccessToken = Nothing
, _epUploadType = Nothing
, _epPayload = pEpPayload_
, _epName = pEpName_
, _epCallback = Nothing
}
epXgafv :: Lens' EnterprisesPatch (Maybe Xgafv)
epXgafv = lens _epXgafv (\ s a -> s{_epXgafv = a})
epUploadProtocol :: Lens' EnterprisesPatch (Maybe Text)
epUploadProtocol
= lens _epUploadProtocol
(\ s a -> s{_epUploadProtocol = a})
epUpdateMask :: Lens' EnterprisesPatch (Maybe GFieldMask)
epUpdateMask
= lens _epUpdateMask (\ s a -> s{_epUpdateMask = a})
epAccessToken :: Lens' EnterprisesPatch (Maybe Text)
epAccessToken
= lens _epAccessToken
(\ s a -> s{_epAccessToken = a})
epUploadType :: Lens' EnterprisesPatch (Maybe Text)
epUploadType
= lens _epUploadType (\ s a -> s{_epUploadType = a})
epPayload :: Lens' EnterprisesPatch Enterprise
epPayload
= lens _epPayload (\ s a -> s{_epPayload = a})
epName :: Lens' EnterprisesPatch Text
epName = lens _epName (\ s a -> s{_epName = a})
epCallback :: Lens' EnterprisesPatch (Maybe Text)
epCallback
= lens _epCallback (\ s a -> s{_epCallback = a})
instance GoogleRequest EnterprisesPatch where
type Rs EnterprisesPatch = Enterprise
type Scopes EnterprisesPatch =
'["https://www.googleapis.com/auth/androidmanagement"]
requestClient EnterprisesPatch'{..}
= go _epName _epXgafv _epUploadProtocol _epUpdateMask
_epAccessToken
_epUploadType
_epCallback
(Just AltJSON)
_epPayload
androidManagementService
where go
= buildClient
(Proxy :: Proxy EnterprisesPatchResource)
mempty