{-# 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.Calendar.Events.Move
(
EventsMoveResource
, eventsMove
, EventsMove
, emDestination
, emCalendarId
, emSendNotifications
, emSendUpdates
, emEventId
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type EventsMoveResource =
"calendar" :>
"v3" :>
"calendars" :>
Capture "calendarId" Text :>
"events" :>
Capture "eventId" Text :>
"move" :>
QueryParam "destination" Text :>
QueryParam "sendNotifications" Bool :>
QueryParam "sendUpdates" EventsMoveSendUpdates :>
QueryParam "alt" AltJSON :> Post '[JSON] Event
data EventsMove = EventsMove'
{ _emDestination :: !Text
, _emCalendarId :: !Text
, _emSendNotifications :: !(Maybe Bool)
, _emSendUpdates :: !(Maybe EventsMoveSendUpdates)
, _emEventId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
eventsMove
:: Text
-> Text
-> Text
-> EventsMove
eventsMove pEmDestination_ pEmCalendarId_ pEmEventId_ =
EventsMove'
{ _emDestination = pEmDestination_
, _emCalendarId = pEmCalendarId_
, _emSendNotifications = Nothing
, _emSendUpdates = Nothing
, _emEventId = pEmEventId_
}
emDestination :: Lens' EventsMove Text
emDestination
= lens _emDestination
(\ s a -> s{_emDestination = a})
emCalendarId :: Lens' EventsMove Text
emCalendarId
= lens _emCalendarId (\ s a -> s{_emCalendarId = a})
emSendNotifications :: Lens' EventsMove (Maybe Bool)
emSendNotifications
= lens _emSendNotifications
(\ s a -> s{_emSendNotifications = a})
emSendUpdates :: Lens' EventsMove (Maybe EventsMoveSendUpdates)
emSendUpdates
= lens _emSendUpdates
(\ s a -> s{_emSendUpdates = a})
emEventId :: Lens' EventsMove Text
emEventId
= lens _emEventId (\ s a -> s{_emEventId = a})
instance GoogleRequest EventsMove where
type Rs EventsMove = Event
type Scopes EventsMove =
'["https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/calendar.events"]
requestClient EventsMove'{..}
= go _emCalendarId _emEventId (Just _emDestination)
_emSendNotifications
_emSendUpdates
(Just AltJSON)
appsCalendarService
where go
= buildClient (Proxy :: Proxy EventsMoveResource)
mempty