{-# 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.Directory.MobileDevices.Action
(
MobileDevicesActionResource
, mobileDevicesAction
, MobileDevicesAction
, mdaResourceId
, mdaPayload
, mdaCustomerId
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type MobileDevicesActionResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customerId" Text :>
"devices" :>
"mobile" :>
Capture "resourceId" Text :>
"action" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] MobileDeviceAction :> Post '[JSON] ()
data MobileDevicesAction = MobileDevicesAction'
{ _mdaResourceId :: !Text
, _mdaPayload :: !MobileDeviceAction
, _mdaCustomerId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
mobileDevicesAction
:: Text
-> MobileDeviceAction
-> Text
-> MobileDevicesAction
mobileDevicesAction pMdaResourceId_ pMdaPayload_ pMdaCustomerId_ =
MobileDevicesAction'
{ _mdaResourceId = pMdaResourceId_
, _mdaPayload = pMdaPayload_
, _mdaCustomerId = pMdaCustomerId_
}
mdaResourceId :: Lens' MobileDevicesAction Text
mdaResourceId
= lens _mdaResourceId
(\ s a -> s{_mdaResourceId = a})
mdaPayload :: Lens' MobileDevicesAction MobileDeviceAction
mdaPayload
= lens _mdaPayload (\ s a -> s{_mdaPayload = a})
mdaCustomerId :: Lens' MobileDevicesAction Text
mdaCustomerId
= lens _mdaCustomerId
(\ s a -> s{_mdaCustomerId = a})
instance GoogleRequest MobileDevicesAction where
type Rs MobileDevicesAction = ()
type Scopes MobileDevicesAction =
'["https://www.googleapis.com/auth/admin.directory.device.mobile",
"https://www.googleapis.com/auth/admin.directory.device.mobile.action"]
requestClient MobileDevicesAction'{..}
= go _mdaCustomerId _mdaResourceId (Just AltJSON)
_mdaPayload
directoryService
where go
= buildClient
(Proxy :: Proxy MobileDevicesActionResource)
mempty