{-# 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.SetAccount
(
EnterprisesSetAccountResource
, enterprisesSetAccount
, EnterprisesSetAccount
, esaEnterpriseId
, esaPayload
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type EnterprisesSetAccountResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"account" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] EnterpriseAccount :>
Put '[JSON] EnterpriseAccount
data EnterprisesSetAccount = EnterprisesSetAccount'
{ _esaEnterpriseId :: !Text
, _esaPayload :: !EnterpriseAccount
} deriving (Eq,Show,Data,Typeable,Generic)
enterprisesSetAccount
:: Text
-> EnterpriseAccount
-> EnterprisesSetAccount
enterprisesSetAccount pEsaEnterpriseId_ pEsaPayload_ =
EnterprisesSetAccount'
{ _esaEnterpriseId = pEsaEnterpriseId_
, _esaPayload = pEsaPayload_
}
esaEnterpriseId :: Lens' EnterprisesSetAccount Text
esaEnterpriseId
= lens _esaEnterpriseId
(\ s a -> s{_esaEnterpriseId = a})
esaPayload :: Lens' EnterprisesSetAccount EnterpriseAccount
esaPayload
= lens _esaPayload (\ s a -> s{_esaPayload = a})
instance GoogleRequest EnterprisesSetAccount where
type Rs EnterprisesSetAccount = EnterpriseAccount
type Scopes EnterprisesSetAccount =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient EnterprisesSetAccount'{..}
= go _esaEnterpriseId (Just AltJSON) _esaPayload
androidEnterpriseService
where go
= buildClient
(Proxy :: Proxy EnterprisesSetAccountResource)
mempty