{-# 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.Patch
(
TasksPatchResource
, tasksPatch
, TasksPatch
, tpPayload
, tpTaskList
, tpTask
) where
import Network.Google.AppsTasks.Types
import Network.Google.Prelude
type TasksPatchResource =
"tasks" :>
"v1" :>
"lists" :>
Capture "tasklist" Text :>
"tasks" :>
Capture "task" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Task :> Patch '[JSON] Task
data TasksPatch = TasksPatch'
{ _tpPayload :: !Task
, _tpTaskList :: !Text
, _tpTask :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
tasksPatch
:: Task
-> Text
-> Text
-> TasksPatch
tasksPatch pTpPayload_ pTpTaskList_ pTpTask_ =
TasksPatch'
{ _tpPayload = pTpPayload_
, _tpTaskList = pTpTaskList_
, _tpTask = pTpTask_
}
tpPayload :: Lens' TasksPatch Task
tpPayload
= lens _tpPayload (\ s a -> s{_tpPayload = a})
tpTaskList :: Lens' TasksPatch Text
tpTaskList
= lens _tpTaskList (\ s a -> s{_tpTaskList = a})
tpTask :: Lens' TasksPatch Text
tpTask = lens _tpTask (\ s a -> s{_tpTask = a})
instance GoogleRequest TasksPatch where
type Rs TasksPatch = Task
type Scopes TasksPatch =
'["https://www.googleapis.com/auth/tasks"]
requestClient TasksPatch'{..}
= go _tpTaskList _tpTask (Just AltJSON) _tpPayload
appsTasksService
where go
= buildClient (Proxy :: Proxy TasksPatchResource)
mempty