{-# 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.Patch
(
UsersPhotosPatchResource
, usersPhotosPatch
, UsersPhotosPatch
, uppPayload
, uppUserKey
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type UsersPhotosPatchResource =
"admin" :>
"directory" :>
"v1" :>
"users" :>
Capture "userKey" Text :>
"photos" :>
"thumbnail" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UserPhoto :> Patch '[JSON] UserPhoto
data UsersPhotosPatch = UsersPhotosPatch'
{ _uppPayload :: !UserPhoto
, _uppUserKey :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersPhotosPatch
:: UserPhoto
-> Text
-> UsersPhotosPatch
usersPhotosPatch pUppPayload_ pUppUserKey_ =
UsersPhotosPatch'
{ _uppPayload = pUppPayload_
, _uppUserKey = pUppUserKey_
}
uppPayload :: Lens' UsersPhotosPatch UserPhoto
uppPayload
= lens _uppPayload (\ s a -> s{_uppPayload = a})
uppUserKey :: Lens' UsersPhotosPatch Text
uppUserKey
= lens _uppUserKey (\ s a -> s{_uppUserKey = a})
instance GoogleRequest UsersPhotosPatch where
type Rs UsersPhotosPatch = UserPhoto
type Scopes UsersPhotosPatch =
'["https://www.googleapis.com/auth/admin.directory.user"]
requestClient UsersPhotosPatch'{..}
= go _uppUserKey (Just AltJSON) _uppPayload
directoryService
where go
= buildClient
(Proxy :: Proxy UsersPhotosPatchResource)
mempty