{-# 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.Watch
(
EventsWatchResource
, eventsWatch
, EventsWatch
, ewSyncToken
, ewCalendarId
, ewTimeMin
, ewOrderBy
, ewSingleEvents
, ewPrivateExtendedProperty
, ewShowDeleted
, ewPayload
, ewQ
, ewSharedExtendedProperty
, ewMaxAttendees
, ewICalUId
, ewUpdatedMin
, ewPageToken
, ewTimeZone
, ewShowHiddenInvitations
, ewMaxResults
, ewAlwaysIncludeEmail
, ewTimeMax
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type EventsWatchResource =
"calendar" :>
"v3" :>
"calendars" :>
Capture "calendarId" Text :>
"events" :>
"watch" :>
QueryParam "syncToken" Text :>
QueryParam "timeMin" DateTime' :>
QueryParam "orderBy" EventsWatchOrderBy :>
QueryParam "singleEvents" Bool :>
QueryParams "privateExtendedProperty" Text :>
QueryParam "showDeleted" Bool :>
QueryParam "q" Text :>
QueryParams "sharedExtendedProperty" Text :>
QueryParam "maxAttendees" (Textual Int32) :>
QueryParam "iCalUID" Text :>
QueryParam "updatedMin" DateTime' :>
QueryParam "pageToken" Text :>
QueryParam "timeZone" Text :>
QueryParam "showHiddenInvitations"
Bool
:>
QueryParam "maxResults"
(Textual Int32)
:>
QueryParam "alwaysIncludeEmail"
Bool
:>
QueryParam "timeMax" DateTime'
:>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Channel :>
Post '[JSON] Channel
data EventsWatch = EventsWatch'
{ _ewSyncToken :: !(Maybe Text)
, _ewCalendarId :: !Text
, _ewTimeMin :: !(Maybe DateTime')
, _ewOrderBy :: !(Maybe EventsWatchOrderBy)
, _ewSingleEvents :: !(Maybe Bool)
, _ewPrivateExtendedProperty :: !(Maybe [Text])
, _ewShowDeleted :: !(Maybe Bool)
, _ewPayload :: !Channel
, _ewQ :: !(Maybe Text)
, _ewSharedExtendedProperty :: !(Maybe [Text])
, _ewMaxAttendees :: !(Maybe (Textual Int32))
, _ewICalUId :: !(Maybe Text)
, _ewUpdatedMin :: !(Maybe DateTime')
, _ewPageToken :: !(Maybe Text)
, _ewTimeZone :: !(Maybe Text)
, _ewShowHiddenInvitations :: !(Maybe Bool)
, _ewMaxResults :: !(Textual Int32)
, _ewAlwaysIncludeEmail :: !(Maybe Bool)
, _ewTimeMax :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
eventsWatch
:: Text
-> Channel
-> EventsWatch
eventsWatch pEwCalendarId_ pEwPayload_ =
EventsWatch'
{ _ewSyncToken = Nothing
, _ewCalendarId = pEwCalendarId_
, _ewTimeMin = Nothing
, _ewOrderBy = Nothing
, _ewSingleEvents = Nothing
, _ewPrivateExtendedProperty = Nothing
, _ewShowDeleted = Nothing
, _ewPayload = pEwPayload_
, _ewQ = Nothing
, _ewSharedExtendedProperty = Nothing
, _ewMaxAttendees = Nothing
, _ewICalUId = Nothing
, _ewUpdatedMin = Nothing
, _ewPageToken = Nothing
, _ewTimeZone = Nothing
, _ewShowHiddenInvitations = Nothing
, _ewMaxResults = 250
, _ewAlwaysIncludeEmail = Nothing
, _ewTimeMax = Nothing
}
ewSyncToken :: Lens' EventsWatch (Maybe Text)
ewSyncToken
= lens _ewSyncToken (\ s a -> s{_ewSyncToken = a})
ewCalendarId :: Lens' EventsWatch Text
ewCalendarId
= lens _ewCalendarId (\ s a -> s{_ewCalendarId = a})
ewTimeMin :: Lens' EventsWatch (Maybe UTCTime)
ewTimeMin
= lens _ewTimeMin (\ s a -> s{_ewTimeMin = a}) .
mapping _DateTime
ewOrderBy :: Lens' EventsWatch (Maybe EventsWatchOrderBy)
ewOrderBy
= lens _ewOrderBy (\ s a -> s{_ewOrderBy = a})
ewSingleEvents :: Lens' EventsWatch (Maybe Bool)
ewSingleEvents
= lens _ewSingleEvents
(\ s a -> s{_ewSingleEvents = a})
ewPrivateExtendedProperty :: Lens' EventsWatch [Text]
ewPrivateExtendedProperty
= lens _ewPrivateExtendedProperty
(\ s a -> s{_ewPrivateExtendedProperty = a})
. _Default
. _Coerce
ewShowDeleted :: Lens' EventsWatch (Maybe Bool)
ewShowDeleted
= lens _ewShowDeleted
(\ s a -> s{_ewShowDeleted = a})
ewPayload :: Lens' EventsWatch Channel
ewPayload
= lens _ewPayload (\ s a -> s{_ewPayload = a})
ewQ :: Lens' EventsWatch (Maybe Text)
ewQ = lens _ewQ (\ s a -> s{_ewQ = a})
ewSharedExtendedProperty :: Lens' EventsWatch [Text]
ewSharedExtendedProperty
= lens _ewSharedExtendedProperty
(\ s a -> s{_ewSharedExtendedProperty = a})
. _Default
. _Coerce
ewMaxAttendees :: Lens' EventsWatch (Maybe Int32)
ewMaxAttendees
= lens _ewMaxAttendees
(\ s a -> s{_ewMaxAttendees = a})
. mapping _Coerce
ewICalUId :: Lens' EventsWatch (Maybe Text)
ewICalUId
= lens _ewICalUId (\ s a -> s{_ewICalUId = a})
ewUpdatedMin :: Lens' EventsWatch (Maybe UTCTime)
ewUpdatedMin
= lens _ewUpdatedMin (\ s a -> s{_ewUpdatedMin = a})
. mapping _DateTime
ewPageToken :: Lens' EventsWatch (Maybe Text)
ewPageToken
= lens _ewPageToken (\ s a -> s{_ewPageToken = a})
ewTimeZone :: Lens' EventsWatch (Maybe Text)
ewTimeZone
= lens _ewTimeZone (\ s a -> s{_ewTimeZone = a})
ewShowHiddenInvitations :: Lens' EventsWatch (Maybe Bool)
ewShowHiddenInvitations
= lens _ewShowHiddenInvitations
(\ s a -> s{_ewShowHiddenInvitations = a})
ewMaxResults :: Lens' EventsWatch Int32
ewMaxResults
= lens _ewMaxResults (\ s a -> s{_ewMaxResults = a})
. _Coerce
ewAlwaysIncludeEmail :: Lens' EventsWatch (Maybe Bool)
ewAlwaysIncludeEmail
= lens _ewAlwaysIncludeEmail
(\ s a -> s{_ewAlwaysIncludeEmail = a})
ewTimeMax :: Lens' EventsWatch (Maybe UTCTime)
ewTimeMax
= lens _ewTimeMax (\ s a -> s{_ewTimeMax = a}) .
mapping _DateTime
instance GoogleRequest EventsWatch where
type Rs EventsWatch = Channel
type Scopes EventsWatch =
'["https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/calendar.events",
"https://www.googleapis.com/auth/calendar.events.readonly",
"https://www.googleapis.com/auth/calendar.readonly"]
requestClient EventsWatch'{..}
= go _ewCalendarId _ewSyncToken _ewTimeMin _ewOrderBy
_ewSingleEvents
(_ewPrivateExtendedProperty ^. _Default)
_ewShowDeleted
_ewQ
(_ewSharedExtendedProperty ^. _Default)
_ewMaxAttendees
_ewICalUId
_ewUpdatedMin
_ewPageToken
_ewTimeZone
_ewShowHiddenInvitations
(Just _ewMaxResults)
_ewAlwaysIncludeEmail
_ewTimeMax
(Just AltJSON)
_ewPayload
appsCalendarService
where go
= buildClient (Proxy :: Proxy EventsWatchResource)
mempty