{-# 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.Messages.Delete
(
UsersMessagesDeleteResource
, usersMessagesDelete
, UsersMessagesDelete
, umdUserId
, umdId
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersMessagesDeleteResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"messages" :>
Capture "id" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
data UsersMessagesDelete = UsersMessagesDelete'
{ _umdUserId :: !Text
, _umdId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersMessagesDelete
:: Text
-> UsersMessagesDelete
usersMessagesDelete pUmdId_ =
UsersMessagesDelete'
{ _umdUserId = "me"
, _umdId = pUmdId_
}
umdUserId :: Lens' UsersMessagesDelete Text
umdUserId
= lens _umdUserId (\ s a -> s{_umdUserId = a})
umdId :: Lens' UsersMessagesDelete Text
umdId = lens _umdId (\ s a -> s{_umdId = a})
instance GoogleRequest UsersMessagesDelete where
type Rs UsersMessagesDelete = ()
type Scopes UsersMessagesDelete =
'["https://mail.google.com/"]
requestClient UsersMessagesDelete'{..}
= go _umdUserId _umdId (Just AltJSON) gmailService
where go
= buildClient
(Proxy :: Proxy UsersMessagesDeleteResource)
mempty