{-# 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.Events.Get
(
EventsGetResource
, eventsGet
, EventsGet
, egCalendarId
, egMaxAttendees
, egTimeZone
, egAlwaysIncludeEmail
, egEventId
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type EventsGetResource =
"calendar" :>
"v3" :>
"calendars" :>
Capture "calendarId" Text :>
"events" :>
Capture "eventId" Text :>
QueryParam "maxAttendees" (Textual Int32) :>
QueryParam "timeZone" Text :>
QueryParam "alwaysIncludeEmail" Bool :>
QueryParam "alt" AltJSON :> Get '[JSON] Event
data EventsGet = EventsGet'
{ _egCalendarId :: !Text
, _egMaxAttendees :: !(Maybe (Textual Int32))
, _egTimeZone :: !(Maybe Text)
, _egAlwaysIncludeEmail :: !(Maybe Bool)
, _egEventId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
eventsGet
:: Text
-> Text
-> EventsGet
eventsGet pEgCalendarId_ pEgEventId_ =
EventsGet'
{ _egCalendarId = pEgCalendarId_
, _egMaxAttendees = Nothing
, _egTimeZone = Nothing
, _egAlwaysIncludeEmail = Nothing
, _egEventId = pEgEventId_
}
egCalendarId :: Lens' EventsGet Text
egCalendarId
= lens _egCalendarId (\ s a -> s{_egCalendarId = a})
egMaxAttendees :: Lens' EventsGet (Maybe Int32)
egMaxAttendees
= lens _egMaxAttendees
(\ s a -> s{_egMaxAttendees = a})
. mapping _Coerce
egTimeZone :: Lens' EventsGet (Maybe Text)
egTimeZone
= lens _egTimeZone (\ s a -> s{_egTimeZone = a})
egAlwaysIncludeEmail :: Lens' EventsGet (Maybe Bool)
egAlwaysIncludeEmail
= lens _egAlwaysIncludeEmail
(\ s a -> s{_egAlwaysIncludeEmail = a})
egEventId :: Lens' EventsGet Text
egEventId
= lens _egEventId (\ s a -> s{_egEventId = a})
instance GoogleRequest EventsGet where
type Rs EventsGet = Event
type Scopes EventsGet =
'["https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/calendar.events",
"https://www.googleapis.com/auth/calendar.events.readonly",
"https://www.googleapis.com/auth/calendar.readonly"]
requestClient EventsGet'{..}
= go _egCalendarId _egEventId _egMaxAttendees
_egTimeZone
_egAlwaysIncludeEmail
(Just AltJSON)
appsCalendarService
where go
= buildClient (Proxy :: Proxy EventsGetResource)
mempty