{-# 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.Directory.Users.Photos.Get
(
UsersPhotosGetResource
, usersPhotosGet
, UsersPhotosGet
, upgUserKey
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type UsersPhotosGetResource =
"admin" :>
"directory" :>
"v1" :>
"users" :>
Capture "userKey" Text :>
"photos" :>
"thumbnail" :>
QueryParam "alt" AltJSON :> Get '[JSON] UserPhoto
newtype UsersPhotosGet = UsersPhotosGet'
{ _upgUserKey :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersPhotosGet
:: Text
-> UsersPhotosGet
usersPhotosGet pUpgUserKey_ =
UsersPhotosGet'
{ _upgUserKey = pUpgUserKey_
}
upgUserKey :: Lens' UsersPhotosGet Text
upgUserKey
= lens _upgUserKey (\ s a -> s{_upgUserKey = a})
instance GoogleRequest UsersPhotosGet where
type Rs UsersPhotosGet = UserPhoto
type Scopes UsersPhotosGet =
'["https://www.googleapis.com/auth/admin.directory.user",
"https://www.googleapis.com/auth/admin.directory.user.readonly"]
requestClient UsersPhotosGet'{..}
= go _upgUserKey (Just AltJSON) directoryService
where go
= buildClient (Proxy :: Proxy UsersPhotosGetResource)
mempty