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