{-# 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.Directory.Tokens.Get
(
TokensGetResource
, tokensGet
, TokensGet
, tgClientId
, tgUserKey
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type TokensGetResource =
"admin" :>
"directory" :>
"v1" :>
"users" :>
Capture "userKey" Text :>
"tokens" :>
Capture "clientId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Token
data TokensGet = TokensGet'
{ _tgClientId :: !Text
, _tgUserKey :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
tokensGet
:: Text
-> Text
-> TokensGet
tokensGet pTgClientId_ pTgUserKey_ =
TokensGet'
{ _tgClientId = pTgClientId_
, _tgUserKey = pTgUserKey_
}
tgClientId :: Lens' TokensGet Text
tgClientId
= lens _tgClientId (\ s a -> s{_tgClientId = a})
tgUserKey :: Lens' TokensGet Text
tgUserKey
= lens _tgUserKey (\ s a -> s{_tgUserKey = a})
instance GoogleRequest TokensGet where
type Rs TokensGet = Token
type Scopes TokensGet =
'["https://www.googleapis.com/auth/admin.directory.user.security"]
requestClient TokensGet'{..}
= go _tgUserKey _tgClientId (Just AltJSON)
directoryService
where go
= buildClient (Proxy :: Proxy TokensGetResource)
mempty