{-# 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.Tasks.Update
(
TasksUpdateResource
, tasksUpdate
, TasksUpdate
, tuPayload
, tuTaskList
, tuTask
) where
import Network.Google.AppsTasks.Types
import Network.Google.Prelude
type TasksUpdateResource =
"tasks" :>
"v1" :>
"lists" :>
Capture "tasklist" Text :>
"tasks" :>
Capture "task" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Task :> Put '[JSON] Task
data TasksUpdate = TasksUpdate'
{ _tuPayload :: !Task
, _tuTaskList :: !Text
, _tuTask :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
tasksUpdate
:: Task
-> Text
-> Text
-> TasksUpdate
tasksUpdate pTuPayload_ pTuTaskList_ pTuTask_ =
TasksUpdate'
{ _tuPayload = pTuPayload_
, _tuTaskList = pTuTaskList_
, _tuTask = pTuTask_
}
tuPayload :: Lens' TasksUpdate Task
tuPayload
= lens _tuPayload (\ s a -> s{_tuPayload = a})
tuTaskList :: Lens' TasksUpdate Text
tuTaskList
= lens _tuTaskList (\ s a -> s{_tuTaskList = a})
tuTask :: Lens' TasksUpdate Text
tuTask = lens _tuTask (\ s a -> s{_tuTask = a})
instance GoogleRequest TasksUpdate where
type Rs TasksUpdate = Task
type Scopes TasksUpdate =
'["https://www.googleapis.com/auth/tasks"]
requestClient TasksUpdate'{..}
= go _tuTaskList _tuTask (Just AltJSON) _tuPayload
appsTasksService
where go
= buildClient (Proxy :: Proxy TasksUpdateResource)
mempty