{-# 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.ACL.Watch
(
ACLWatchResource
, aclWatch
, ACLWatch
, awSyncToken
, awCalendarId
, awShowDeleted
, awPayload
, awPageToken
, awMaxResults
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type ACLWatchResource =
"calendar" :>
"v3" :>
"calendars" :>
Capture "calendarId" Text :>
"acl" :>
"watch" :>
QueryParam "syncToken" Text :>
QueryParam "showDeleted" Bool :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Channel :> Post '[JSON] Channel
data ACLWatch = ACLWatch'
{ _awSyncToken :: !(Maybe Text)
, _awCalendarId :: !Text
, _awShowDeleted :: !(Maybe Bool)
, _awPayload :: !Channel
, _awPageToken :: !(Maybe Text)
, _awMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
aclWatch
:: Text
-> Channel
-> ACLWatch
aclWatch pAwCalendarId_ pAwPayload_ =
ACLWatch'
{ _awSyncToken = Nothing
, _awCalendarId = pAwCalendarId_
, _awShowDeleted = Nothing
, _awPayload = pAwPayload_
, _awPageToken = Nothing
, _awMaxResults = Nothing
}
awSyncToken :: Lens' ACLWatch (Maybe Text)
awSyncToken
= lens _awSyncToken (\ s a -> s{_awSyncToken = a})
awCalendarId :: Lens' ACLWatch Text
awCalendarId
= lens _awCalendarId (\ s a -> s{_awCalendarId = a})
awShowDeleted :: Lens' ACLWatch (Maybe Bool)
awShowDeleted
= lens _awShowDeleted
(\ s a -> s{_awShowDeleted = a})
awPayload :: Lens' ACLWatch Channel
awPayload
= lens _awPayload (\ s a -> s{_awPayload = a})
awPageToken :: Lens' ACLWatch (Maybe Text)
awPageToken
= lens _awPageToken (\ s a -> s{_awPageToken = a})
awMaxResults :: Lens' ACLWatch (Maybe Int32)
awMaxResults
= lens _awMaxResults (\ s a -> s{_awMaxResults = a})
. mapping _Coerce
instance GoogleRequest ACLWatch where
type Rs ACLWatch = Channel
type Scopes ACLWatch =
'["https://www.googleapis.com/auth/calendar"]
requestClient ACLWatch'{..}
= go _awCalendarId _awSyncToken _awShowDeleted
_awPageToken
_awMaxResults
(Just AltJSON)
_awPayload
appsCalendarService
where go
= buildClient (Proxy :: Proxy ACLWatchResource)
mempty