{-# 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.Labels.Delete
(
UsersLabelsDeleteResource
, usersLabelsDelete
, UsersLabelsDelete
, uldUserId
, uldId
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersLabelsDeleteResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"labels" :>
Capture "id" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
data UsersLabelsDelete = UsersLabelsDelete'
{ _uldUserId :: !Text
, _uldId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersLabelsDelete
:: Text
-> UsersLabelsDelete
usersLabelsDelete pUldId_ =
UsersLabelsDelete'
{ _uldUserId = "me"
, _uldId = pUldId_
}
uldUserId :: Lens' UsersLabelsDelete Text
uldUserId
= lens _uldUserId (\ s a -> s{_uldUserId = a})
uldId :: Lens' UsersLabelsDelete Text
uldId = lens _uldId (\ s a -> s{_uldId = a})
instance GoogleRequest UsersLabelsDelete where
type Rs UsersLabelsDelete = ()
type Scopes UsersLabelsDelete =
'["https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.labels",
"https://www.googleapis.com/auth/gmail.modify"]
requestClient UsersLabelsDelete'{..}
= go _uldUserId _uldId (Just AltJSON) gmailService
where go
= buildClient
(Proxy :: Proxy UsersLabelsDeleteResource)
mempty