{-# 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.Threads.Delete
(
UsersThreadsDeleteResource
, usersThreadsDelete
, UsersThreadsDelete
, utdUserId
, utdId
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersThreadsDeleteResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"threads" :>
Capture "id" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
data UsersThreadsDelete = UsersThreadsDelete'
{ _utdUserId :: !Text
, _utdId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersThreadsDelete
:: Text
-> UsersThreadsDelete
usersThreadsDelete pUtdId_ =
UsersThreadsDelete'
{ _utdUserId = "me"
, _utdId = pUtdId_
}
utdUserId :: Lens' UsersThreadsDelete Text
utdUserId
= lens _utdUserId (\ s a -> s{_utdUserId = a})
utdId :: Lens' UsersThreadsDelete Text
utdId = lens _utdId (\ s a -> s{_utdId = a})
instance GoogleRequest UsersThreadsDelete where
type Rs UsersThreadsDelete = ()
type Scopes UsersThreadsDelete =
'["https://mail.google.com/"]
requestClient UsersThreadsDelete'{..}
= go _utdUserId _utdId (Just AltJSON) gmailService
where go
= buildClient
(Proxy :: Proxy UsersThreadsDeleteResource)
mempty