{-# 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.Policies.Patch
(
EnterprisesPoliciesPatchResource
, enterprisesPoliciesPatch
, EnterprisesPoliciesPatch
, eppXgafv
, eppUploadProtocol
, eppUpdateMask
, eppAccessToken
, eppUploadType
, eppPayload
, eppName
, eppCallback
) where
import Network.Google.AndroidManagement.Types
import Network.Google.Prelude
type EnterprisesPoliciesPatchResource =
"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] Policy :> Patch '[JSON] Policy
data EnterprisesPoliciesPatch = EnterprisesPoliciesPatch'
{ _eppXgafv :: !(Maybe Xgafv)
, _eppUploadProtocol :: !(Maybe Text)
, _eppUpdateMask :: !(Maybe GFieldMask)
, _eppAccessToken :: !(Maybe Text)
, _eppUploadType :: !(Maybe Text)
, _eppPayload :: !Policy
, _eppName :: !Text
, _eppCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
enterprisesPoliciesPatch
:: Policy
-> Text
-> EnterprisesPoliciesPatch
enterprisesPoliciesPatch pEppPayload_ pEppName_ =
EnterprisesPoliciesPatch'
{ _eppXgafv = Nothing
, _eppUploadProtocol = Nothing
, _eppUpdateMask = Nothing
, _eppAccessToken = Nothing
, _eppUploadType = Nothing
, _eppPayload = pEppPayload_
, _eppName = pEppName_
, _eppCallback = Nothing
}
eppXgafv :: Lens' EnterprisesPoliciesPatch (Maybe Xgafv)
eppXgafv = lens _eppXgafv (\ s a -> s{_eppXgafv = a})
eppUploadProtocol :: Lens' EnterprisesPoliciesPatch (Maybe Text)
eppUploadProtocol
= lens _eppUploadProtocol
(\ s a -> s{_eppUploadProtocol = a})
eppUpdateMask :: Lens' EnterprisesPoliciesPatch (Maybe GFieldMask)
eppUpdateMask
= lens _eppUpdateMask
(\ s a -> s{_eppUpdateMask = a})
eppAccessToken :: Lens' EnterprisesPoliciesPatch (Maybe Text)
eppAccessToken
= lens _eppAccessToken
(\ s a -> s{_eppAccessToken = a})
eppUploadType :: Lens' EnterprisesPoliciesPatch (Maybe Text)
eppUploadType
= lens _eppUploadType
(\ s a -> s{_eppUploadType = a})
eppPayload :: Lens' EnterprisesPoliciesPatch Policy
eppPayload
= lens _eppPayload (\ s a -> s{_eppPayload = a})
eppName :: Lens' EnterprisesPoliciesPatch Text
eppName = lens _eppName (\ s a -> s{_eppName = a})
eppCallback :: Lens' EnterprisesPoliciesPatch (Maybe Text)
eppCallback
= lens _eppCallback (\ s a -> s{_eppCallback = a})
instance GoogleRequest EnterprisesPoliciesPatch where
type Rs EnterprisesPoliciesPatch = Policy
type Scopes EnterprisesPoliciesPatch =
'["https://www.googleapis.com/auth/androidmanagement"]
requestClient EnterprisesPoliciesPatch'{..}
= go _eppName _eppXgafv _eppUploadProtocol
_eppUpdateMask
_eppAccessToken
_eppUploadType
_eppCallback
(Just AltJSON)
_eppPayload
androidManagementService
where go
= buildClient
(Proxy :: Proxy EnterprisesPoliciesPatchResource)
mempty