{-# 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.Update
(
InstallsUpdateResource
, installsUpdate
, InstallsUpdate
, iuEnterpriseId
, iuPayload
, iuUserId
, iuInstallId
, iuDeviceId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type InstallsUpdateResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
Capture "userId" Text :>
"devices" :>
Capture "deviceId" Text :>
"installs" :>
Capture "installId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Install :> Put '[JSON] Install
data InstallsUpdate = InstallsUpdate'
{ _iuEnterpriseId :: !Text
, _iuPayload :: !Install
, _iuUserId :: !Text
, _iuInstallId :: !Text
, _iuDeviceId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
installsUpdate
:: Text
-> Install
-> Text
-> Text
-> Text
-> InstallsUpdate
installsUpdate pIuEnterpriseId_ pIuPayload_ pIuUserId_ pIuInstallId_ pIuDeviceId_ =
InstallsUpdate'
{ _iuEnterpriseId = pIuEnterpriseId_
, _iuPayload = pIuPayload_
, _iuUserId = pIuUserId_
, _iuInstallId = pIuInstallId_
, _iuDeviceId = pIuDeviceId_
}
iuEnterpriseId :: Lens' InstallsUpdate Text
iuEnterpriseId
= lens _iuEnterpriseId
(\ s a -> s{_iuEnterpriseId = a})
iuPayload :: Lens' InstallsUpdate Install
iuPayload
= lens _iuPayload (\ s a -> s{_iuPayload = a})
iuUserId :: Lens' InstallsUpdate Text
iuUserId = lens _iuUserId (\ s a -> s{_iuUserId = a})
iuInstallId :: Lens' InstallsUpdate Text
iuInstallId
= lens _iuInstallId (\ s a -> s{_iuInstallId = a})
iuDeviceId :: Lens' InstallsUpdate Text
iuDeviceId
= lens _iuDeviceId (\ s a -> s{_iuDeviceId = a})
instance GoogleRequest InstallsUpdate where
type Rs InstallsUpdate = Install
type Scopes InstallsUpdate =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient InstallsUpdate'{..}
= go _iuEnterpriseId _iuUserId _iuDeviceId
_iuInstallId
(Just AltJSON)
_iuPayload
androidEnterpriseService
where go
= buildClient (Proxy :: Proxy InstallsUpdateResource)
mempty