{-# 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.Delete
(
CalendarsDeleteResource
, calendarsDelete
, CalendarsDelete
, cdCalendarId
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type CalendarsDeleteResource =
"calendar" :>
"v3" :>
"calendars" :>
Capture "calendarId" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
-- | Deletes a secondary calendar. Use calendars.clear for clearing all
-- events on primary calendars.
--
-- /See:/ 'calendarsDelete' smart constructor.
newtype CalendarsDelete = CalendarsDelete'
{ _cdCalendarId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'CalendarsDelete' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cdCalendarId'
calendarsDelete
:: Text -- ^ 'cdCalendarId'
-> CalendarsDelete
calendarsDelete pCdCalendarId_ =
CalendarsDelete'
{ _cdCalendarId = pCdCalendarId_
}
-- | 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.
cdCalendarId :: Lens' CalendarsDelete Text
cdCalendarId
= lens _cdCalendarId (\ s a -> s{_cdCalendarId = a})
instance GoogleRequest CalendarsDelete where
type Rs CalendarsDelete = ()
type Scopes CalendarsDelete =
'["https://www.googleapis.com/auth/calendar"]
requestClient CalendarsDelete'{..}
= go _cdCalendarId (Just AltJSON) appsCalendarService
where go
= buildClient
(Proxy :: Proxy CalendarsDeleteResource)
mempty