{-# 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.Trash
(
UsersThreadsTrashResource
, usersThreadsTrash
, UsersThreadsTrash
, uttUserId
, uttId
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersThreadsTrashResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"threads" :>
Capture "id" Text :>
"trash" :>
QueryParam "alt" AltJSON :> Post '[JSON] Thread
data UsersThreadsTrash = UsersThreadsTrash'
{ _uttUserId :: !Text
, _uttId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersThreadsTrash
:: Text
-> UsersThreadsTrash
usersThreadsTrash pUttId_ =
UsersThreadsTrash'
{ _uttUserId = "me"
, _uttId = pUttId_
}
uttUserId :: Lens' UsersThreadsTrash Text
uttUserId
= lens _uttUserId (\ s a -> s{_uttUserId = a})
uttId :: Lens' UsersThreadsTrash Text
uttId = lens _uttId (\ s a -> s{_uttId = a})
instance GoogleRequest UsersThreadsTrash where
type Rs UsersThreadsTrash = Thread
type Scopes UsersThreadsTrash =
'["https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify"]
requestClient UsersThreadsTrash'{..}
= go _uttUserId _uttId (Just AltJSON) gmailService
where go
= buildClient
(Proxy :: Proxy UsersThreadsTrashResource)
mempty