{-# 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.Enterprises.SetAndroidDevicePolicyConfig
(
EnterprisesSetAndroidDevicePolicyConfigResource
, enterprisesSetAndroidDevicePolicyConfig
, EnterprisesSetAndroidDevicePolicyConfig
, esadpcEnterpriseId
, esadpcPayload
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type EnterprisesSetAndroidDevicePolicyConfigResource
=
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"androidDevicePolicyConfig" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AndroidDevicePolicyConfig :>
Put '[JSON] AndroidDevicePolicyConfig
data EnterprisesSetAndroidDevicePolicyConfig = EnterprisesSetAndroidDevicePolicyConfig'
{ _esadpcEnterpriseId :: !Text
, _esadpcPayload :: !AndroidDevicePolicyConfig
} deriving (Eq,Show,Data,Typeable,Generic)
enterprisesSetAndroidDevicePolicyConfig
:: Text
-> AndroidDevicePolicyConfig
-> EnterprisesSetAndroidDevicePolicyConfig
enterprisesSetAndroidDevicePolicyConfig pEsadpcEnterpriseId_ pEsadpcPayload_ =
EnterprisesSetAndroidDevicePolicyConfig'
{ _esadpcEnterpriseId = pEsadpcEnterpriseId_
, _esadpcPayload = pEsadpcPayload_
}
esadpcEnterpriseId :: Lens' EnterprisesSetAndroidDevicePolicyConfig Text
esadpcEnterpriseId
= lens _esadpcEnterpriseId
(\ s a -> s{_esadpcEnterpriseId = a})
esadpcPayload :: Lens' EnterprisesSetAndroidDevicePolicyConfig AndroidDevicePolicyConfig
esadpcPayload
= lens _esadpcPayload
(\ s a -> s{_esadpcPayload = a})
instance GoogleRequest
EnterprisesSetAndroidDevicePolicyConfig where
type Rs EnterprisesSetAndroidDevicePolicyConfig =
AndroidDevicePolicyConfig
type Scopes EnterprisesSetAndroidDevicePolicyConfig =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient
EnterprisesSetAndroidDevicePolicyConfig'{..}
= go _esadpcEnterpriseId (Just AltJSON)
_esadpcPayload
androidEnterpriseService
where go
= buildClient
(Proxy ::
Proxy
EnterprisesSetAndroidDevicePolicyConfigResource)
mempty