{-# 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.Gmail.Users.Stop
(
UsersStopResource
, usersStop
, UsersStop
, usUserId
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersStopResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"stop" :> QueryParam "alt" AltJSON :> Post '[JSON] ()
newtype UsersStop = UsersStop'
{ _usUserId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersStop
:: UsersStop
usersStop =
UsersStop'
{ _usUserId = "me"
}
usUserId :: Lens' UsersStop Text
usUserId = lens _usUserId (\ s a -> s{_usUserId = a})
instance GoogleRequest UsersStop where
type Rs UsersStop = ()
type Scopes UsersStop =
'["https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.metadata",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly"]
requestClient UsersStop'{..}
= go _usUserId (Just AltJSON) gmailService
where go
= buildClient (Proxy :: Proxy UsersStopResource)
mempty