{-# 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.Move
(
TasksMoveResource
, tasksMove
, TasksMove
, tmParent
, tmTaskList
, tmTask
, tmPrevious
) where
import Network.Google.AppsTasks.Types
import Network.Google.Prelude
type TasksMoveResource =
"tasks" :>
"v1" :>
"lists" :>
Capture "tasklist" Text :>
"tasks" :>
Capture "task" Text :>
"move" :>
QueryParam "parent" Text :>
QueryParam "previous" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] Task
data TasksMove = TasksMove'
{ _tmParent :: !(Maybe Text)
, _tmTaskList :: !Text
, _tmTask :: !Text
, _tmPrevious :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
tasksMove
:: Text
-> Text
-> TasksMove
tasksMove pTmTaskList_ pTmTask_ =
TasksMove'
{ _tmParent = Nothing
, _tmTaskList = pTmTaskList_
, _tmTask = pTmTask_
, _tmPrevious = Nothing
}
tmParent :: Lens' TasksMove (Maybe Text)
tmParent = lens _tmParent (\ s a -> s{_tmParent = a})
tmTaskList :: Lens' TasksMove Text
tmTaskList
= lens _tmTaskList (\ s a -> s{_tmTaskList = a})
tmTask :: Lens' TasksMove Text
tmTask = lens _tmTask (\ s a -> s{_tmTask = a})
tmPrevious :: Lens' TasksMove (Maybe Text)
tmPrevious
= lens _tmPrevious (\ s a -> s{_tmPrevious = a})
instance GoogleRequest TasksMove where
type Rs TasksMove = Task
type Scopes TasksMove =
'["https://www.googleapis.com/auth/tasks"]
requestClient TasksMove'{..}
= go _tmTaskList _tmTask _tmParent _tmPrevious
(Just AltJSON)
appsTasksService
where go
= buildClient (Proxy :: Proxy TasksMoveResource)
mempty