{-# 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.Untrash
(
UsersThreadsUntrashResource
, usersThreadsUntrash
, UsersThreadsUntrash
, utuUserId
, utuId
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersThreadsUntrashResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"threads" :>
Capture "id" Text :>
"untrash" :>
QueryParam "alt" AltJSON :> Post '[JSON] Thread
data UsersThreadsUntrash = UsersThreadsUntrash'
{ _utuUserId :: !Text
, _utuId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersThreadsUntrash
:: Text
-> UsersThreadsUntrash
usersThreadsUntrash pUtuId_ =
UsersThreadsUntrash'
{ _utuUserId = "me"
, _utuId = pUtuId_
}
utuUserId :: Lens' UsersThreadsUntrash Text
utuUserId
= lens _utuUserId (\ s a -> s{_utuUserId = a})
utuId :: Lens' UsersThreadsUntrash Text
utuId = lens _utuId (\ s a -> s{_utuId = a})
instance GoogleRequest UsersThreadsUntrash where
type Rs UsersThreadsUntrash = Thread
type Scopes UsersThreadsUntrash =
'["https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify"]
requestClient UsersThreadsUntrash'{..}
= go _utuUserId _utuId (Just AltJSON) gmailService
where go
= buildClient
(Proxy :: Proxy UsersThreadsUntrashResource)
mempty