{-# 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.AndroidEnterprise.Installs.Patch
(
InstallsPatchResource
, installsPatch
, InstallsPatch
, ipEnterpriseId
, ipPayload
, ipUserId
, ipInstallId
, ipDeviceId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type InstallsPatchResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
Capture "userId" Text :>
"devices" :>
Capture "deviceId" Text :>
"installs" :>
Capture "installId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Install :> Patch '[JSON] Install
data InstallsPatch = InstallsPatch'
{ _ipEnterpriseId :: !Text
, _ipPayload :: !Install
, _ipUserId :: !Text
, _ipInstallId :: !Text
, _ipDeviceId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
installsPatch
:: Text
-> Install
-> Text
-> Text
-> Text
-> InstallsPatch
installsPatch pIpEnterpriseId_ pIpPayload_ pIpUserId_ pIpInstallId_ pIpDeviceId_ =
InstallsPatch'
{ _ipEnterpriseId = pIpEnterpriseId_
, _ipPayload = pIpPayload_
, _ipUserId = pIpUserId_
, _ipInstallId = pIpInstallId_
, _ipDeviceId = pIpDeviceId_
}
ipEnterpriseId :: Lens' InstallsPatch Text
ipEnterpriseId
= lens _ipEnterpriseId
(\ s a -> s{_ipEnterpriseId = a})
ipPayload :: Lens' InstallsPatch Install
ipPayload
= lens _ipPayload (\ s a -> s{_ipPayload = a})
ipUserId :: Lens' InstallsPatch Text
ipUserId = lens _ipUserId (\ s a -> s{_ipUserId = a})
ipInstallId :: Lens' InstallsPatch Text
ipInstallId
= lens _ipInstallId (\ s a -> s{_ipInstallId = a})
ipDeviceId :: Lens' InstallsPatch Text
ipDeviceId
= lens _ipDeviceId (\ s a -> s{_ipDeviceId = a})
instance GoogleRequest InstallsPatch where
type Rs InstallsPatch = Install
type Scopes InstallsPatch =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient InstallsPatch'{..}
= go _ipEnterpriseId _ipUserId _ipDeviceId
_ipInstallId
(Just AltJSON)
_ipPayload
androidEnterpriseService
where go
= buildClient (Proxy :: Proxy InstallsPatchResource)
mempty