{-# 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.Enroll
(
EnterprisesEnrollResource
, enterprisesEnroll
, EnterprisesEnroll
, eeToken
, eePayload
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type EnterprisesEnrollResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
"enroll" :>
QueryParam "token" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Enterprise :> Post '[JSON] Enterprise
data EnterprisesEnroll = EnterprisesEnroll'
{ _eeToken :: !Text
, _eePayload :: !Enterprise
} deriving (Eq,Show,Data,Typeable,Generic)
enterprisesEnroll
:: Text
-> Enterprise
-> EnterprisesEnroll
enterprisesEnroll pEeToken_ pEePayload_ =
EnterprisesEnroll'
{ _eeToken = pEeToken_
, _eePayload = pEePayload_
}
eeToken :: Lens' EnterprisesEnroll Text
eeToken = lens _eeToken (\ s a -> s{_eeToken = a})
eePayload :: Lens' EnterprisesEnroll Enterprise
eePayload
= lens _eePayload (\ s a -> s{_eePayload = a})
instance GoogleRequest EnterprisesEnroll where
type Rs EnterprisesEnroll = Enterprise
type Scopes EnterprisesEnroll =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient EnterprisesEnroll'{..}
= go (Just _eeToken) (Just AltJSON) _eePayload
androidEnterpriseService
where go
= buildClient
(Proxy :: Proxy EnterprisesEnrollResource)
mempty