{-# 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.Create
(
EnterprisesCreateResource
, enterprisesCreate
, EnterprisesCreate
, ecXgafv
, ecSignupURLName
, ecUploadProtocol
, ecAccessToken
, ecUploadType
, ecPayload
, ecProjectId
, ecEnterpriseToken
, ecCallback
) where
import Network.Google.AndroidManagement.Types
import Network.Google.Prelude
type EnterprisesCreateResource =
"v1" :>
"enterprises" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "signupUrlName" Text :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "projectId" Text :>
QueryParam "enterpriseToken" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Enterprise :> Post '[JSON] Enterprise
data EnterprisesCreate = EnterprisesCreate'
{ _ecXgafv :: !(Maybe Xgafv)
, _ecSignupURLName :: !(Maybe Text)
, _ecUploadProtocol :: !(Maybe Text)
, _ecAccessToken :: !(Maybe Text)
, _ecUploadType :: !(Maybe Text)
, _ecPayload :: !Enterprise
, _ecProjectId :: !(Maybe Text)
, _ecEnterpriseToken :: !(Maybe Text)
, _ecCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
enterprisesCreate
:: Enterprise
-> EnterprisesCreate
enterprisesCreate pEcPayload_ =
EnterprisesCreate'
{ _ecXgafv = Nothing
, _ecSignupURLName = Nothing
, _ecUploadProtocol = Nothing
, _ecAccessToken = Nothing
, _ecUploadType = Nothing
, _ecPayload = pEcPayload_
, _ecProjectId = Nothing
, _ecEnterpriseToken = Nothing
, _ecCallback = Nothing
}
ecXgafv :: Lens' EnterprisesCreate (Maybe Xgafv)
ecXgafv = lens _ecXgafv (\ s a -> s{_ecXgafv = a})
ecSignupURLName :: Lens' EnterprisesCreate (Maybe Text)
ecSignupURLName
= lens _ecSignupURLName
(\ s a -> s{_ecSignupURLName = a})
ecUploadProtocol :: Lens' EnterprisesCreate (Maybe Text)
ecUploadProtocol
= lens _ecUploadProtocol
(\ s a -> s{_ecUploadProtocol = a})
ecAccessToken :: Lens' EnterprisesCreate (Maybe Text)
ecAccessToken
= lens _ecAccessToken
(\ s a -> s{_ecAccessToken = a})
ecUploadType :: Lens' EnterprisesCreate (Maybe Text)
ecUploadType
= lens _ecUploadType (\ s a -> s{_ecUploadType = a})
ecPayload :: Lens' EnterprisesCreate Enterprise
ecPayload
= lens _ecPayload (\ s a -> s{_ecPayload = a})
ecProjectId :: Lens' EnterprisesCreate (Maybe Text)
ecProjectId
= lens _ecProjectId (\ s a -> s{_ecProjectId = a})
ecEnterpriseToken :: Lens' EnterprisesCreate (Maybe Text)
ecEnterpriseToken
= lens _ecEnterpriseToken
(\ s a -> s{_ecEnterpriseToken = a})
ecCallback :: Lens' EnterprisesCreate (Maybe Text)
ecCallback
= lens _ecCallback (\ s a -> s{_ecCallback = a})
instance GoogleRequest EnterprisesCreate where
type Rs EnterprisesCreate = Enterprise
type Scopes EnterprisesCreate =
'["https://www.googleapis.com/auth/androidmanagement"]
requestClient EnterprisesCreate'{..}
= go _ecXgafv _ecSignupURLName _ecUploadProtocol
_ecAccessToken
_ecUploadType
_ecProjectId
_ecEnterpriseToken
_ecCallback
(Just AltJSON)
_ecPayload
androidManagementService
where go
= buildClient
(Proxy :: Proxy EnterprisesCreateResource)
mempty