{-# 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.CalendarList.Watch
(
CalendarListWatchResource
, calendarListWatch
, CalendarListWatch
, clwSyncToken
, clwMinAccessRole
, clwShowDeleted
, clwPayload
, clwShowHidden
, clwPageToken
, clwMaxResults
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type CalendarListWatchResource =
"calendar" :>
"v3" :>
"users" :>
"me" :>
"calendarList" :>
"watch" :>
QueryParam "syncToken" Text :>
QueryParam "minAccessRole"
CalendarListWatchMinAccessRole
:>
QueryParam "showDeleted" Bool :>
QueryParam "showHidden" Bool :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Channel :> Post '[JSON] Channel
data CalendarListWatch = CalendarListWatch'
{ _clwSyncToken :: !(Maybe Text)
, _clwMinAccessRole :: !(Maybe CalendarListWatchMinAccessRole)
, _clwShowDeleted :: !(Maybe Bool)
, _clwPayload :: !Channel
, _clwShowHidden :: !(Maybe Bool)
, _clwPageToken :: !(Maybe Text)
, _clwMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
calendarListWatch
:: Channel
-> CalendarListWatch
calendarListWatch pClwPayload_ =
CalendarListWatch'
{ _clwSyncToken = Nothing
, _clwMinAccessRole = Nothing
, _clwShowDeleted = Nothing
, _clwPayload = pClwPayload_
, _clwShowHidden = Nothing
, _clwPageToken = Nothing
, _clwMaxResults = Nothing
}
clwSyncToken :: Lens' CalendarListWatch (Maybe Text)
clwSyncToken
= lens _clwSyncToken (\ s a -> s{_clwSyncToken = a})
clwMinAccessRole :: Lens' CalendarListWatch (Maybe CalendarListWatchMinAccessRole)
clwMinAccessRole
= lens _clwMinAccessRole
(\ s a -> s{_clwMinAccessRole = a})
clwShowDeleted :: Lens' CalendarListWatch (Maybe Bool)
clwShowDeleted
= lens _clwShowDeleted
(\ s a -> s{_clwShowDeleted = a})
clwPayload :: Lens' CalendarListWatch Channel
clwPayload
= lens _clwPayload (\ s a -> s{_clwPayload = a})
clwShowHidden :: Lens' CalendarListWatch (Maybe Bool)
clwShowHidden
= lens _clwShowHidden
(\ s a -> s{_clwShowHidden = a})
clwPageToken :: Lens' CalendarListWatch (Maybe Text)
clwPageToken
= lens _clwPageToken (\ s a -> s{_clwPageToken = a})
clwMaxResults :: Lens' CalendarListWatch (Maybe Int32)
clwMaxResults
= lens _clwMaxResults
(\ s a -> s{_clwMaxResults = a})
. mapping _Coerce
instance GoogleRequest CalendarListWatch where
type Rs CalendarListWatch = Channel
type Scopes CalendarListWatch =
'["https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/calendar.readonly"]
requestClient CalendarListWatch'{..}
= go _clwSyncToken _clwMinAccessRole _clwShowDeleted
_clwShowHidden
_clwPageToken
_clwMaxResults
(Just AltJSON)
_clwPayload
appsCalendarService
where go
= buildClient
(Proxy :: Proxy CalendarListWatchResource)
mempty