{-# 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.CalendarList.Patch
(
CalendarListPatchResource
, calendarListPatch
, CalendarListPatch
, clpCalendarId
, clpPayload
, clpColorRgbFormat
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type CalendarListPatchResource =
"calendar" :>
"v3" :>
"users" :>
"me" :>
"calendarList" :>
Capture "calendarId" Text :>
QueryParam "colorRgbFormat" Bool :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CalendarListEntry :>
Patch '[JSON] CalendarListEntry
data CalendarListPatch = CalendarListPatch'
{ _clpCalendarId :: !Text
, _clpPayload :: !CalendarListEntry
, _clpColorRgbFormat :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
calendarListPatch
:: Text
-> CalendarListEntry
-> CalendarListPatch
calendarListPatch pClpCalendarId_ pClpPayload_ =
CalendarListPatch'
{ _clpCalendarId = pClpCalendarId_
, _clpPayload = pClpPayload_
, _clpColorRgbFormat = Nothing
}
clpCalendarId :: Lens' CalendarListPatch Text
clpCalendarId
= lens _clpCalendarId
(\ s a -> s{_clpCalendarId = a})
clpPayload :: Lens' CalendarListPatch CalendarListEntry
clpPayload
= lens _clpPayload (\ s a -> s{_clpPayload = a})
clpColorRgbFormat :: Lens' CalendarListPatch (Maybe Bool)
clpColorRgbFormat
= lens _clpColorRgbFormat
(\ s a -> s{_clpColorRgbFormat = a})
instance GoogleRequest CalendarListPatch where
type Rs CalendarListPatch = CalendarListEntry
type Scopes CalendarListPatch =
'["https://www.googleapis.com/auth/calendar"]
requestClient CalendarListPatch'{..}
= go _clpCalendarId _clpColorRgbFormat (Just AltJSON)
_clpPayload
appsCalendarService
where go
= buildClient
(Proxy :: Proxy CalendarListPatchResource)
mempty