{-# 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.List
(
UsersLabelsListResource
, usersLabelsList
, UsersLabelsList
, ullUserId
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersLabelsListResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"labels" :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListLabelsResponse
newtype UsersLabelsList = UsersLabelsList'
{ _ullUserId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersLabelsList
:: UsersLabelsList
usersLabelsList =
UsersLabelsList'
{ _ullUserId = "me"
}
ullUserId :: Lens' UsersLabelsList Text
ullUserId
= lens _ullUserId (\ s a -> s{_ullUserId = a})
instance GoogleRequest UsersLabelsList where
type Rs UsersLabelsList = ListLabelsResponse
type Scopes UsersLabelsList =
'["https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.labels",
"https://www.googleapis.com/auth/gmail.metadata",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly"]
requestClient UsersLabelsList'{..}
= go _ullUserId (Just AltJSON) gmailService
where go
= buildClient
(Proxy :: Proxy UsersLabelsListResource)
mempty