{-# 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.Insert
(
TaskListsInsertResource
, taskListsInsert
, TaskListsInsert
, tliPayload
) where
import Network.Google.AppsTasks.Types
import Network.Google.Prelude
type TaskListsInsertResource =
"tasks" :>
"v1" :>
"users" :>
"@me" :>
"lists" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TaskList :> Post '[JSON] TaskList
newtype TaskListsInsert = TaskListsInsert'
{ _tliPayload :: TaskList
} deriving (Eq,Show,Data,Typeable,Generic)
taskListsInsert
:: TaskList
-> TaskListsInsert
taskListsInsert pTliPayload_ =
TaskListsInsert'
{ _tliPayload = pTliPayload_
}
tliPayload :: Lens' TaskListsInsert TaskList
tliPayload
= lens _tliPayload (\ s a -> s{_tliPayload = a})
instance GoogleRequest TaskListsInsert where
type Rs TaskListsInsert = TaskList
type Scopes TaskListsInsert =
'["https://www.googleapis.com/auth/tasks"]
requestClient TaskListsInsert'{..}
= go (Just AltJSON) _tliPayload appsTasksService
where go
= buildClient
(Proxy :: Proxy TaskListsInsertResource)
mempty