{-# 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.Devices.Patch
(
EnterprisesDevicesPatchResource
, enterprisesDevicesPatch
, EnterprisesDevicesPatch
, edpXgafv
, edpUploadProtocol
, edpUpdateMask
, edpAccessToken
, edpUploadType
, edpPayload
, edpName
, edpCallback
) where
import Network.Google.AndroidManagement.Types
import Network.Google.Prelude
type EnterprisesDevicesPatchResource =
"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] Device :> Patch '[JSON] Device
data EnterprisesDevicesPatch = EnterprisesDevicesPatch'
{ _edpXgafv :: !(Maybe Xgafv)
, _edpUploadProtocol :: !(Maybe Text)
, _edpUpdateMask :: !(Maybe GFieldMask)
, _edpAccessToken :: !(Maybe Text)
, _edpUploadType :: !(Maybe Text)
, _edpPayload :: !Device
, _edpName :: !Text
, _edpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
enterprisesDevicesPatch
:: Device
-> Text
-> EnterprisesDevicesPatch
enterprisesDevicesPatch pEdpPayload_ pEdpName_ =
EnterprisesDevicesPatch'
{ _edpXgafv = Nothing
, _edpUploadProtocol = Nothing
, _edpUpdateMask = Nothing
, _edpAccessToken = Nothing
, _edpUploadType = Nothing
, _edpPayload = pEdpPayload_
, _edpName = pEdpName_
, _edpCallback = Nothing
}
edpXgafv :: Lens' EnterprisesDevicesPatch (Maybe Xgafv)
edpXgafv = lens _edpXgafv (\ s a -> s{_edpXgafv = a})
edpUploadProtocol :: Lens' EnterprisesDevicesPatch (Maybe Text)
edpUploadProtocol
= lens _edpUploadProtocol
(\ s a -> s{_edpUploadProtocol = a})
edpUpdateMask :: Lens' EnterprisesDevicesPatch (Maybe GFieldMask)
edpUpdateMask
= lens _edpUpdateMask
(\ s a -> s{_edpUpdateMask = a})
edpAccessToken :: Lens' EnterprisesDevicesPatch (Maybe Text)
edpAccessToken
= lens _edpAccessToken
(\ s a -> s{_edpAccessToken = a})
edpUploadType :: Lens' EnterprisesDevicesPatch (Maybe Text)
edpUploadType
= lens _edpUploadType
(\ s a -> s{_edpUploadType = a})
edpPayload :: Lens' EnterprisesDevicesPatch Device
edpPayload
= lens _edpPayload (\ s a -> s{_edpPayload = a})
edpName :: Lens' EnterprisesDevicesPatch Text
edpName = lens _edpName (\ s a -> s{_edpName = a})
edpCallback :: Lens' EnterprisesDevicesPatch (Maybe Text)
edpCallback
= lens _edpCallback (\ s a -> s{_edpCallback = a})
instance GoogleRequest EnterprisesDevicesPatch where
type Rs EnterprisesDevicesPatch = Device
type Scopes EnterprisesDevicesPatch =
'["https://www.googleapis.com/auth/androidmanagement"]
requestClient EnterprisesDevicesPatch'{..}
= go _edpName _edpXgafv _edpUploadProtocol
_edpUpdateMask
_edpAccessToken
_edpUploadType
_edpCallback
(Just AltJSON)
_edpPayload
androidManagementService
where go
= buildClient
(Proxy :: Proxy EnterprisesDevicesPatchResource)
mempty