{-# 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.GenerateSignupURL
(
EnterprisesGenerateSignupURLResource
, enterprisesGenerateSignupURL
, EnterprisesGenerateSignupURL
, egsuCallbackURL
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type EnterprisesGenerateSignupURLResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
"signupUrl" :>
QueryParam "callbackUrl" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] SignupInfo
newtype EnterprisesGenerateSignupURL = EnterprisesGenerateSignupURL'
{ _egsuCallbackURL :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
enterprisesGenerateSignupURL
:: EnterprisesGenerateSignupURL
enterprisesGenerateSignupURL =
EnterprisesGenerateSignupURL'
{ _egsuCallbackURL = Nothing
}
egsuCallbackURL :: Lens' EnterprisesGenerateSignupURL (Maybe Text)
egsuCallbackURL
= lens _egsuCallbackURL
(\ s a -> s{_egsuCallbackURL = a})
instance GoogleRequest EnterprisesGenerateSignupURL
where
type Rs EnterprisesGenerateSignupURL = SignupInfo
type Scopes EnterprisesGenerateSignupURL =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient EnterprisesGenerateSignupURL'{..}
= go _egsuCallbackURL (Just AltJSON)
androidEnterpriseService
where go
= buildClient
(Proxy :: Proxy EnterprisesGenerateSignupURLResource)
mempty