{-# 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.Users.GenerateAuthenticationToken
(
UsersGenerateAuthenticationTokenResource
, usersGenerateAuthenticationToken
, UsersGenerateAuthenticationToken
, ugatEnterpriseId
, ugatUserId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type UsersGenerateAuthenticationTokenResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
Capture "userId" Text :>
"authenticationToken" :>
QueryParam "alt" AltJSON :>
Post '[JSON] AuthenticationToken
data UsersGenerateAuthenticationToken = UsersGenerateAuthenticationToken'
{ _ugatEnterpriseId :: !Text
, _ugatUserId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersGenerateAuthenticationToken
:: Text
-> Text
-> UsersGenerateAuthenticationToken
usersGenerateAuthenticationToken pUgatEnterpriseId_ pUgatUserId_ =
UsersGenerateAuthenticationToken'
{ _ugatEnterpriseId = pUgatEnterpriseId_
, _ugatUserId = pUgatUserId_
}
ugatEnterpriseId :: Lens' UsersGenerateAuthenticationToken Text
ugatEnterpriseId
= lens _ugatEnterpriseId
(\ s a -> s{_ugatEnterpriseId = a})
ugatUserId :: Lens' UsersGenerateAuthenticationToken Text
ugatUserId
= lens _ugatUserId (\ s a -> s{_ugatUserId = a})
instance GoogleRequest
UsersGenerateAuthenticationToken where
type Rs UsersGenerateAuthenticationToken =
AuthenticationToken
type Scopes UsersGenerateAuthenticationToken =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient UsersGenerateAuthenticationToken'{..}
= go _ugatEnterpriseId _ugatUserId (Just AltJSON)
androidEnterpriseService
where go
= buildClient
(Proxy ::
Proxy UsersGenerateAuthenticationTokenResource)
mempty