{-# 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.Patch
(
EventsPatchResource
, eventsPatch
, EventsPatch
, epConferenceDataVersion
, epCalendarId
, epPayload
, epMaxAttendees
, epSendNotifications
, epSupportsAttachments
, epSendUpdates
, epAlwaysIncludeEmail
, epEventId
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type EventsPatchResource =
"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" EventsPatchSendUpdates :>
QueryParam "alwaysIncludeEmail" Bool :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Event :> Patch '[JSON] Event
data EventsPatch = EventsPatch'
{ _epConferenceDataVersion :: !(Maybe (Textual Int32))
, _epCalendarId :: !Text
, _epPayload :: !Event
, _epMaxAttendees :: !(Maybe (Textual Int32))
, _epSendNotifications :: !(Maybe Bool)
, _epSupportsAttachments :: !(Maybe Bool)
, _epSendUpdates :: !(Maybe EventsPatchSendUpdates)
, _epAlwaysIncludeEmail :: !(Maybe Bool)
, _epEventId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
eventsPatch
:: Text
-> Event
-> Text
-> EventsPatch
eventsPatch pEpCalendarId_ pEpPayload_ pEpEventId_ =
EventsPatch'
{ _epConferenceDataVersion = Nothing
, _epCalendarId = pEpCalendarId_
, _epPayload = pEpPayload_
, _epMaxAttendees = Nothing
, _epSendNotifications = Nothing
, _epSupportsAttachments = Nothing
, _epSendUpdates = Nothing
, _epAlwaysIncludeEmail = Nothing
, _epEventId = pEpEventId_
}
epConferenceDataVersion :: Lens' EventsPatch (Maybe Int32)
epConferenceDataVersion
= lens _epConferenceDataVersion
(\ s a -> s{_epConferenceDataVersion = a})
. mapping _Coerce
epCalendarId :: Lens' EventsPatch Text
epCalendarId
= lens _epCalendarId (\ s a -> s{_epCalendarId = a})
epPayload :: Lens' EventsPatch Event
epPayload
= lens _epPayload (\ s a -> s{_epPayload = a})
epMaxAttendees :: Lens' EventsPatch (Maybe Int32)
epMaxAttendees
= lens _epMaxAttendees
(\ s a -> s{_epMaxAttendees = a})
. mapping _Coerce
epSendNotifications :: Lens' EventsPatch (Maybe Bool)
epSendNotifications
= lens _epSendNotifications
(\ s a -> s{_epSendNotifications = a})
epSupportsAttachments :: Lens' EventsPatch (Maybe Bool)
epSupportsAttachments
= lens _epSupportsAttachments
(\ s a -> s{_epSupportsAttachments = a})
epSendUpdates :: Lens' EventsPatch (Maybe EventsPatchSendUpdates)
epSendUpdates
= lens _epSendUpdates
(\ s a -> s{_epSendUpdates = a})
epAlwaysIncludeEmail :: Lens' EventsPatch (Maybe Bool)
epAlwaysIncludeEmail
= lens _epAlwaysIncludeEmail
(\ s a -> s{_epAlwaysIncludeEmail = a})
epEventId :: Lens' EventsPatch Text
epEventId
= lens _epEventId (\ s a -> s{_epEventId = a})
instance GoogleRequest EventsPatch where
type Rs EventsPatch = Event
type Scopes EventsPatch =
'["https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/calendar.events"]
requestClient EventsPatch'{..}
= go _epCalendarId _epEventId
_epConferenceDataVersion
_epMaxAttendees
_epSendNotifications
_epSupportsAttachments
_epSendUpdates
_epAlwaysIncludeEmail
(Just AltJSON)
_epPayload
appsCalendarService
where go
= buildClient (Proxy :: Proxy EventsPatchResource)
mempty