{-# 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
-- | Returns an access control rule.
--
-- /See:/ 'aclGet' smart constructor.
data ACLGet = ACLGet'
{ _agCalendarId :: !Text
, _agRuleId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'ACLGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'agCalendarId'
--
-- * 'agRuleId'
aclGet
:: Text -- ^ 'agCalendarId'
-> Text -- ^ 'agRuleId'
-> ACLGet
aclGet pAgCalendarId_ pAgRuleId_ =
ACLGet'
{ _agCalendarId = pAgCalendarId_
, _agRuleId = pAgRuleId_
}
-- | Calendar identifier. To retrieve calendar IDs call the calendarList.list
-- method. If you want to access the primary calendar of the currently
-- logged in user, use the \"primary\" keyword.
agCalendarId :: Lens' ACLGet Text
agCalendarId
= lens _agCalendarId (\ s a -> s{_agCalendarId = a})
-- | ACL rule identifier.
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