{-# 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.Tasks.TaskLists.Update
(
TaskListsUpdateResource
, taskListsUpdate
, TaskListsUpdate
, tluPayload
, tluTaskList
) where
import Network.Google.AppsTasks.Types
import Network.Google.Prelude
type TaskListsUpdateResource =
"tasks" :>
"v1" :>
"users" :>
"@me" :>
"lists" :>
Capture "tasklist" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TaskList :> Put '[JSON] TaskList
data TaskListsUpdate = TaskListsUpdate'
{ _tluPayload :: !TaskList
, _tluTaskList :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
taskListsUpdate
:: TaskList
-> Text
-> TaskListsUpdate
taskListsUpdate pTluPayload_ pTluTaskList_ =
TaskListsUpdate'
{ _tluPayload = pTluPayload_
, _tluTaskList = pTluTaskList_
}
tluPayload :: Lens' TaskListsUpdate TaskList
tluPayload
= lens _tluPayload (\ s a -> s{_tluPayload = a})
tluTaskList :: Lens' TaskListsUpdate Text
tluTaskList
= lens _tluTaskList (\ s a -> s{_tluTaskList = a})
instance GoogleRequest TaskListsUpdate where
type Rs TaskListsUpdate = TaskList
type Scopes TaskListsUpdate =
'["https://www.googleapis.com/auth/tasks"]
requestClient TaskListsUpdate'{..}
= go _tluTaskList (Just AltJSON) _tluPayload
appsTasksService
where go
= buildClient
(Proxy :: Proxy TaskListsUpdateResource)
mempty