{-# 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.Patch
(
CalendarsPatchResource
, calendarsPatch
, CalendarsPatch
, cpCalendarId
, cpPayload
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type CalendarsPatchResource =
"calendar" :>
"v3" :>
"calendars" :>
Capture "calendarId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Calendar :> Patch '[JSON] Calendar
data CalendarsPatch = CalendarsPatch'
{ _cpCalendarId :: !Text
, _cpPayload :: !Calendar
} deriving (Eq,Show,Data,Typeable,Generic)
calendarsPatch
:: Text
-> Calendar
-> CalendarsPatch
calendarsPatch pCpCalendarId_ pCpPayload_ =
CalendarsPatch'
{ _cpCalendarId = pCpCalendarId_
, _cpPayload = pCpPayload_
}
cpCalendarId :: Lens' CalendarsPatch Text
cpCalendarId
= lens _cpCalendarId (\ s a -> s{_cpCalendarId = a})
cpPayload :: Lens' CalendarsPatch Calendar
cpPayload
= lens _cpPayload (\ s a -> s{_cpPayload = a})
instance GoogleRequest CalendarsPatch where
type Rs CalendarsPatch = Calendar
type Scopes CalendarsPatch =
'["https://www.googleapis.com/auth/calendar"]
requestClient CalendarsPatch'{..}
= go _cpCalendarId (Just AltJSON) _cpPayload
appsCalendarService
where go
= buildClient (Proxy :: Proxy CalendarsPatchResource)
mempty