{-# 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.Patch
(
TaskListsPatchResource
, taskListsPatch
, TaskListsPatch
, tlpPayload
, tlpTaskList
) where
import Network.Google.AppsTasks.Types
import Network.Google.Prelude
type TaskListsPatchResource =
"tasks" :>
"v1" :>
"users" :>
"@me" :>
"lists" :>
Capture "tasklist" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TaskList :> Patch '[JSON] TaskList
data TaskListsPatch = TaskListsPatch'
{ _tlpPayload :: !TaskList
, _tlpTaskList :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
taskListsPatch
:: TaskList
-> Text
-> TaskListsPatch
taskListsPatch pTlpPayload_ pTlpTaskList_ =
TaskListsPatch'
{ _tlpPayload = pTlpPayload_
, _tlpTaskList = pTlpTaskList_
}
tlpPayload :: Lens' TaskListsPatch TaskList
tlpPayload
= lens _tlpPayload (\ s a -> s{_tlpPayload = a})
tlpTaskList :: Lens' TaskListsPatch Text
tlpTaskList
= lens _tlpTaskList (\ s a -> s{_tlpTaskList = a})
instance GoogleRequest TaskListsPatch where
type Rs TaskListsPatch = TaskList
type Scopes TaskListsPatch =
'["https://www.googleapis.com/auth/tasks"]
requestClient TaskListsPatch'{..}
= go _tlpTaskList (Just AltJSON) _tlpPayload
appsTasksService
where go
= buildClient (Proxy :: Proxy TaskListsPatchResource)
mempty