{-# 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.RevokeToken
(
UsersRevokeTokenResource
, usersRevokeToken
, UsersRevokeToken
, urtEnterpriseId
, urtUserId
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type UsersRevokeTokenResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"users" :>
Capture "userId" Text :>
"token" :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
data UsersRevokeToken = UsersRevokeToken'
{ _urtEnterpriseId :: !Text
, _urtUserId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersRevokeToken
:: Text
-> Text
-> UsersRevokeToken
usersRevokeToken pUrtEnterpriseId_ pUrtUserId_ =
UsersRevokeToken'
{ _urtEnterpriseId = pUrtEnterpriseId_
, _urtUserId = pUrtUserId_
}
urtEnterpriseId :: Lens' UsersRevokeToken Text
urtEnterpriseId
= lens _urtEnterpriseId
(\ s a -> s{_urtEnterpriseId = a})
urtUserId :: Lens' UsersRevokeToken Text
urtUserId
= lens _urtUserId (\ s a -> s{_urtUserId = a})
instance GoogleRequest UsersRevokeToken where
type Rs UsersRevokeToken = ()
type Scopes UsersRevokeToken =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient UsersRevokeToken'{..}
= go _urtEnterpriseId _urtUserId (Just AltJSON)
androidEnterpriseService
where go
= buildClient
(Proxy :: Proxy UsersRevokeTokenResource)
mempty