{-# 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.Get
(
ACLGetResource
, aclGet
, ACLGet
, agCalendarId
, agRuleId
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type ACLGetResource =
"calendar" :>
"v3" :>
"calendars" :>
Capture "calendarId" Text :>
"acl" :>
Capture "ruleId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] ACLRule
data ACLGet = ACLGet'
{ _agCalendarId :: !Text
, _agRuleId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
aclGet
:: Text
-> Text
-> ACLGet
aclGet pAgCalendarId_ pAgRuleId_ =
ACLGet'
{ _agCalendarId = pAgCalendarId_
, _agRuleId = pAgRuleId_
}
agCalendarId :: Lens' ACLGet Text
agCalendarId
= lens _agCalendarId (\ s a -> s{_agCalendarId = a})
agRuleId :: Lens' ACLGet Text
agRuleId = lens _agRuleId (\ s a -> s{_agRuleId = a})
instance GoogleRequest ACLGet where
type Rs ACLGet = ACLRule
type Scopes ACLGet =
'["https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/calendar.readonly"]
requestClient ACLGet'{..}
= go _agCalendarId _agRuleId (Just AltJSON)
appsCalendarService
where go
= buildClient (Proxy :: Proxy ACLGetResource) mempty