{-# 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.Update
(
EventsUpdateResource
, eventsUpdate
, EventsUpdate
, euConferenceDataVersion
, euCalendarId
, euPayload
, euMaxAttendees
, euSendNotifications
, euSupportsAttachments
, euSendUpdates
, euAlwaysIncludeEmail
, euEventId
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type EventsUpdateResource =
"calendar" :>
"v3" :>
"calendars" :>
Capture "calendarId" Text :>
"events" :>
Capture "eventId" Text :>
QueryParam "conferenceDataVersion" (Textual Int32) :>
QueryParam "maxAttendees" (Textual Int32) :>
QueryParam "sendNotifications" Bool :>
QueryParam "supportsAttachments" Bool :>
QueryParam "sendUpdates" EventsUpdateSendUpdates :>
QueryParam "alwaysIncludeEmail" Bool :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Event :> Put '[JSON] Event
data EventsUpdate = EventsUpdate'
{ _euConferenceDataVersion :: !(Maybe (Textual Int32))
, _euCalendarId :: !Text
, _euPayload :: !Event
, _euMaxAttendees :: !(Maybe (Textual Int32))
, _euSendNotifications :: !(Maybe Bool)
, _euSupportsAttachments :: !(Maybe Bool)
, _euSendUpdates :: !(Maybe EventsUpdateSendUpdates)
, _euAlwaysIncludeEmail :: !(Maybe Bool)
, _euEventId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
eventsUpdate
:: Text
-> Event
-> Text
-> EventsUpdate
eventsUpdate pEuCalendarId_ pEuPayload_ pEuEventId_ =
EventsUpdate'
{ _euConferenceDataVersion = Nothing
, _euCalendarId = pEuCalendarId_
, _euPayload = pEuPayload_
, _euMaxAttendees = Nothing
, _euSendNotifications = Nothing
, _euSupportsAttachments = Nothing
, _euSendUpdates = Nothing
, _euAlwaysIncludeEmail = Nothing
, _euEventId = pEuEventId_
}
euConferenceDataVersion :: Lens' EventsUpdate (Maybe Int32)
euConferenceDataVersion
= lens _euConferenceDataVersion
(\ s a -> s{_euConferenceDataVersion = a})
. mapping _Coerce
euCalendarId :: Lens' EventsUpdate Text
euCalendarId
= lens _euCalendarId (\ s a -> s{_euCalendarId = a})
euPayload :: Lens' EventsUpdate Event
euPayload
= lens _euPayload (\ s a -> s{_euPayload = a})
euMaxAttendees :: Lens' EventsUpdate (Maybe Int32)
euMaxAttendees
= lens _euMaxAttendees
(\ s a -> s{_euMaxAttendees = a})
. mapping _Coerce
euSendNotifications :: Lens' EventsUpdate (Maybe Bool)
euSendNotifications
= lens _euSendNotifications
(\ s a -> s{_euSendNotifications = a})
euSupportsAttachments :: Lens' EventsUpdate (Maybe Bool)
euSupportsAttachments
= lens _euSupportsAttachments
(\ s a -> s{_euSupportsAttachments = a})
euSendUpdates :: Lens' EventsUpdate (Maybe EventsUpdateSendUpdates)
euSendUpdates
= lens _euSendUpdates
(\ s a -> s{_euSendUpdates = a})
euAlwaysIncludeEmail :: Lens' EventsUpdate (Maybe Bool)
euAlwaysIncludeEmail
= lens _euAlwaysIncludeEmail
(\ s a -> s{_euAlwaysIncludeEmail = a})
euEventId :: Lens' EventsUpdate Text
euEventId
= lens _euEventId (\ s a -> s{_euEventId = a})
instance GoogleRequest EventsUpdate where
type Rs EventsUpdate = Event
type Scopes EventsUpdate =
'["https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/calendar.events"]
requestClient EventsUpdate'{..}
= go _euCalendarId _euEventId
_euConferenceDataVersion
_euMaxAttendees
_euSendNotifications
_euSupportsAttachments
_euSendUpdates
_euAlwaysIncludeEmail
(Just AltJSON)
_euPayload
appsCalendarService
where go
= buildClient (Proxy :: Proxy EventsUpdateResource)
mempty