{-# 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.Drafts.Delete
(
UsersDraftsDeleteResource
, usersDraftsDelete
, UsersDraftsDelete
, uddUserId
, uddId
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersDraftsDeleteResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"drafts" :>
Capture "id" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
data UsersDraftsDelete = UsersDraftsDelete'
{ _uddUserId :: !Text
, _uddId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersDraftsDelete
:: Text
-> UsersDraftsDelete
usersDraftsDelete pUddId_ =
UsersDraftsDelete'
{ _uddUserId = "me"
, _uddId = pUddId_
}
uddUserId :: Lens' UsersDraftsDelete Text
uddUserId
= lens _uddUserId (\ s a -> s{_uddUserId = a})
uddId :: Lens' UsersDraftsDelete Text
uddId = lens _uddId (\ s a -> s{_uddId = a})
instance GoogleRequest UsersDraftsDelete where
type Rs UsersDraftsDelete = ()
type Scopes UsersDraftsDelete =
'["https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.compose",
"https://www.googleapis.com/auth/gmail.modify"]
requestClient UsersDraftsDelete'{..}
= go _uddUserId _uddId (Just AltJSON) gmailService
where go
= buildClient
(Proxy :: Proxy UsersDraftsDeleteResource)
mempty