{-# 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.Delete
(
EventsDeleteResource
, eventsDelete
, EventsDelete
, edCalendarId
, edSendNotifications
, edSendUpdates
, edEventId
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type EventsDeleteResource =
"calendar" :>
"v3" :>
"calendars" :>
Capture "calendarId" Text :>
"events" :>
Capture "eventId" Text :>
QueryParam "sendNotifications" Bool :>
QueryParam "sendUpdates" EventsDeleteSendUpdates :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
data EventsDelete = EventsDelete'
{ _edCalendarId :: !Text
, _edSendNotifications :: !(Maybe Bool)
, _edSendUpdates :: !(Maybe EventsDeleteSendUpdates)
, _edEventId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
eventsDelete
:: Text
-> Text
-> EventsDelete
eventsDelete pEdCalendarId_ pEdEventId_ =
EventsDelete'
{ _edCalendarId = pEdCalendarId_
, _edSendNotifications = Nothing
, _edSendUpdates = Nothing
, _edEventId = pEdEventId_
}
edCalendarId :: Lens' EventsDelete Text
edCalendarId
= lens _edCalendarId (\ s a -> s{_edCalendarId = a})
edSendNotifications :: Lens' EventsDelete (Maybe Bool)
edSendNotifications
= lens _edSendNotifications
(\ s a -> s{_edSendNotifications = a})
edSendUpdates :: Lens' EventsDelete (Maybe EventsDeleteSendUpdates)
edSendUpdates
= lens _edSendUpdates
(\ s a -> s{_edSendUpdates = a})
edEventId :: Lens' EventsDelete Text
edEventId
= lens _edEventId (\ s a -> s{_edEventId = a})
instance GoogleRequest EventsDelete where
type Rs EventsDelete = ()
type Scopes EventsDelete =
'["https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/calendar.events"]
requestClient EventsDelete'{..}
= go _edCalendarId _edEventId _edSendNotifications
_edSendUpdates
(Just AltJSON)
appsCalendarService
where go
= buildClient (Proxy :: Proxy EventsDeleteResource)
mempty