{-# 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.Update
(
ACLUpdateResource
, aclUpdate
, ACLUpdate
, auCalendarId
, auRuleId
, auPayload
, auSendNotifications
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type ACLUpdateResource =
"calendar" :>
"v3" :>
"calendars" :>
Capture "calendarId" Text :>
"acl" :>
Capture "ruleId" Text :>
QueryParam "sendNotifications" Bool :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ACLRule :> Put '[JSON] ACLRule
data ACLUpdate = ACLUpdate'
{ _auCalendarId :: !Text
, _auRuleId :: !Text
, _auPayload :: !ACLRule
, _auSendNotifications :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
aclUpdate
:: Text
-> Text
-> ACLRule
-> ACLUpdate
aclUpdate pAuCalendarId_ pAuRuleId_ pAuPayload_ =
ACLUpdate'
{ _auCalendarId = pAuCalendarId_
, _auRuleId = pAuRuleId_
, _auPayload = pAuPayload_
, _auSendNotifications = Nothing
}
auCalendarId :: Lens' ACLUpdate Text
auCalendarId
= lens _auCalendarId (\ s a -> s{_auCalendarId = a})
auRuleId :: Lens' ACLUpdate Text
auRuleId = lens _auRuleId (\ s a -> s{_auRuleId = a})
auPayload :: Lens' ACLUpdate ACLRule
auPayload
= lens _auPayload (\ s a -> s{_auPayload = a})
auSendNotifications :: Lens' ACLUpdate (Maybe Bool)
auSendNotifications
= lens _auSendNotifications
(\ s a -> s{_auSendNotifications = a})
instance GoogleRequest ACLUpdate where
type Rs ACLUpdate = ACLRule
type Scopes ACLUpdate =
'["https://www.googleapis.com/auth/calendar"]
requestClient ACLUpdate'{..}
= go _auCalendarId _auRuleId _auSendNotifications
(Just AltJSON)
_auPayload
appsCalendarService
where go
= buildClient (Proxy :: Proxy ACLUpdateResource)
mempty