{-# 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.WebTokens.Create
(
EnterprisesWebTokensCreateResource
, enterprisesWebTokensCreate
, EnterprisesWebTokensCreate
, ewtcParent
, ewtcXgafv
, ewtcUploadProtocol
, ewtcAccessToken
, ewtcUploadType
, ewtcPayload
, ewtcCallback
) where
import Network.Google.AndroidManagement.Types
import Network.Google.Prelude
type EnterprisesWebTokensCreateResource =
"v1" :>
Capture "parent" Text :>
"webTokens" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] WebToken :> Post '[JSON] WebToken
data EnterprisesWebTokensCreate = EnterprisesWebTokensCreate'
{ _ewtcParent :: !Text
, _ewtcXgafv :: !(Maybe Xgafv)
, _ewtcUploadProtocol :: !(Maybe Text)
, _ewtcAccessToken :: !(Maybe Text)
, _ewtcUploadType :: !(Maybe Text)
, _ewtcPayload :: !WebToken
, _ewtcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
enterprisesWebTokensCreate
:: Text
-> WebToken
-> EnterprisesWebTokensCreate
enterprisesWebTokensCreate pEwtcParent_ pEwtcPayload_ =
EnterprisesWebTokensCreate'
{ _ewtcParent = pEwtcParent_
, _ewtcXgafv = Nothing
, _ewtcUploadProtocol = Nothing
, _ewtcAccessToken = Nothing
, _ewtcUploadType = Nothing
, _ewtcPayload = pEwtcPayload_
, _ewtcCallback = Nothing
}
ewtcParent :: Lens' EnterprisesWebTokensCreate Text
ewtcParent
= lens _ewtcParent (\ s a -> s{_ewtcParent = a})
ewtcXgafv :: Lens' EnterprisesWebTokensCreate (Maybe Xgafv)
ewtcXgafv
= lens _ewtcXgafv (\ s a -> s{_ewtcXgafv = a})
ewtcUploadProtocol :: Lens' EnterprisesWebTokensCreate (Maybe Text)
ewtcUploadProtocol
= lens _ewtcUploadProtocol
(\ s a -> s{_ewtcUploadProtocol = a})
ewtcAccessToken :: Lens' EnterprisesWebTokensCreate (Maybe Text)
ewtcAccessToken
= lens _ewtcAccessToken
(\ s a -> s{_ewtcAccessToken = a})
ewtcUploadType :: Lens' EnterprisesWebTokensCreate (Maybe Text)
ewtcUploadType
= lens _ewtcUploadType
(\ s a -> s{_ewtcUploadType = a})
ewtcPayload :: Lens' EnterprisesWebTokensCreate WebToken
ewtcPayload
= lens _ewtcPayload (\ s a -> s{_ewtcPayload = a})
ewtcCallback :: Lens' EnterprisesWebTokensCreate (Maybe Text)
ewtcCallback
= lens _ewtcCallback (\ s a -> s{_ewtcCallback = a})
instance GoogleRequest EnterprisesWebTokensCreate
where
type Rs EnterprisesWebTokensCreate = WebToken
type Scopes EnterprisesWebTokensCreate =
'["https://www.googleapis.com/auth/androidmanagement"]
requestClient EnterprisesWebTokensCreate'{..}
= go _ewtcParent _ewtcXgafv _ewtcUploadProtocol
_ewtcAccessToken
_ewtcUploadType
_ewtcCallback
(Just AltJSON)
_ewtcPayload
androidManagementService
where go
= buildClient
(Proxy :: Proxy EnterprisesWebTokensCreateResource)
mempty