{-# 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.Calendars.Get
(
CalendarsGetResource
, calendarsGet
, CalendarsGet
, cgCalendarId
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type CalendarsGetResource =
"calendar" :>
"v3" :>
"calendars" :>
Capture "calendarId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Calendar
newtype CalendarsGet = CalendarsGet'
{ _cgCalendarId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
calendarsGet
:: Text
-> CalendarsGet
calendarsGet pCgCalendarId_ =
CalendarsGet'
{ _cgCalendarId = pCgCalendarId_
}
cgCalendarId :: Lens' CalendarsGet Text
cgCalendarId
= lens _cgCalendarId (\ s a -> s{_cgCalendarId = a})
instance GoogleRequest CalendarsGet where
type Rs CalendarsGet = Calendar
type Scopes CalendarsGet =
'["https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/calendar.readonly"]
requestClient CalendarsGet'{..}
= go _cgCalendarId (Just AltJSON) appsCalendarService
where go
= buildClient (Proxy :: Proxy CalendarsGetResource)
mempty