{-# 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.Update
(
CalendarsUpdateResource
, calendarsUpdate
, CalendarsUpdate
, cuCalendarId
, cuPayload
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type CalendarsUpdateResource =
"calendar" :>
"v3" :>
"calendars" :>
Capture "calendarId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Calendar :> Put '[JSON] Calendar
data CalendarsUpdate = CalendarsUpdate'
{ _cuCalendarId :: !Text
, _cuPayload :: !Calendar
} deriving (Eq,Show,Data,Typeable,Generic)
calendarsUpdate
:: Text
-> Calendar
-> CalendarsUpdate
calendarsUpdate pCuCalendarId_ pCuPayload_ =
CalendarsUpdate'
{ _cuCalendarId = pCuCalendarId_
, _cuPayload = pCuPayload_
}
cuCalendarId :: Lens' CalendarsUpdate Text
cuCalendarId
= lens _cuCalendarId (\ s a -> s{_cuCalendarId = a})
cuPayload :: Lens' CalendarsUpdate Calendar
cuPayload
= lens _cuPayload (\ s a -> s{_cuPayload = a})
instance GoogleRequest CalendarsUpdate where
type Rs CalendarsUpdate = Calendar
type Scopes CalendarsUpdate =
'["https://www.googleapis.com/auth/calendar"]
requestClient CalendarsUpdate'{..}
= go _cuCalendarId (Just AltJSON) _cuPayload
appsCalendarService
where go
= buildClient
(Proxy :: Proxy CalendarsUpdateResource)
mempty