{-# 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.AndroidManagement.Enterprises.EnrollmentTokens.Create
(
EnterprisesEnrollmentTokensCreateResource
, enterprisesEnrollmentTokensCreate
, EnterprisesEnrollmentTokensCreate
, eetcParent
, eetcXgafv
, eetcUploadProtocol
, eetcAccessToken
, eetcUploadType
, eetcPayload
, eetcCallback
) where
import Network.Google.AndroidManagement.Types
import Network.Google.Prelude
type EnterprisesEnrollmentTokensCreateResource =
"v1" :>
Capture "parent" Text :>
"enrollmentTokens" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] EnrollmentToken :>
Post '[JSON] EnrollmentToken
data EnterprisesEnrollmentTokensCreate = EnterprisesEnrollmentTokensCreate'
{ _eetcParent :: !Text
, _eetcXgafv :: !(Maybe Xgafv)
, _eetcUploadProtocol :: !(Maybe Text)
, _eetcAccessToken :: !(Maybe Text)
, _eetcUploadType :: !(Maybe Text)
, _eetcPayload :: !EnrollmentToken
, _eetcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
enterprisesEnrollmentTokensCreate
:: Text
-> EnrollmentToken
-> EnterprisesEnrollmentTokensCreate
enterprisesEnrollmentTokensCreate pEetcParent_ pEetcPayload_ =
EnterprisesEnrollmentTokensCreate'
{ _eetcParent = pEetcParent_
, _eetcXgafv = Nothing
, _eetcUploadProtocol = Nothing
, _eetcAccessToken = Nothing
, _eetcUploadType = Nothing
, _eetcPayload = pEetcPayload_
, _eetcCallback = Nothing
}
eetcParent :: Lens' EnterprisesEnrollmentTokensCreate Text
eetcParent
= lens _eetcParent (\ s a -> s{_eetcParent = a})
eetcXgafv :: Lens' EnterprisesEnrollmentTokensCreate (Maybe Xgafv)
eetcXgafv
= lens _eetcXgafv (\ s a -> s{_eetcXgafv = a})
eetcUploadProtocol :: Lens' EnterprisesEnrollmentTokensCreate (Maybe Text)
eetcUploadProtocol
= lens _eetcUploadProtocol
(\ s a -> s{_eetcUploadProtocol = a})
eetcAccessToken :: Lens' EnterprisesEnrollmentTokensCreate (Maybe Text)
eetcAccessToken
= lens _eetcAccessToken
(\ s a -> s{_eetcAccessToken = a})
eetcUploadType :: Lens' EnterprisesEnrollmentTokensCreate (Maybe Text)
eetcUploadType
= lens _eetcUploadType
(\ s a -> s{_eetcUploadType = a})
eetcPayload :: Lens' EnterprisesEnrollmentTokensCreate EnrollmentToken
eetcPayload
= lens _eetcPayload (\ s a -> s{_eetcPayload = a})
eetcCallback :: Lens' EnterprisesEnrollmentTokensCreate (Maybe Text)
eetcCallback
= lens _eetcCallback (\ s a -> s{_eetcCallback = a})
instance GoogleRequest
EnterprisesEnrollmentTokensCreate where
type Rs EnterprisesEnrollmentTokensCreate =
EnrollmentToken
type Scopes EnterprisesEnrollmentTokensCreate =
'["https://www.googleapis.com/auth/androidmanagement"]
requestClient EnterprisesEnrollmentTokensCreate'{..}
= go _eetcParent _eetcXgafv _eetcUploadProtocol
_eetcAccessToken
_eetcUploadType
_eetcCallback
(Just AltJSON)
_eetcPayload
androidManagementService
where go
= buildClient
(Proxy ::
Proxy EnterprisesEnrollmentTokensCreateResource)
mempty