{-# 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.Directory.Resources.Calendars.Patch
(
ResourcesCalendarsPatchResource
, resourcesCalendarsPatch
, ResourcesCalendarsPatch
, rcpPayload
, rcpCustomer
, rcpCalendarResourceId
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type ResourcesCalendarsPatchResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"resources" :>
"calendars" :>
Capture "calendarResourceId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CalendarResource :>
Patch '[JSON] CalendarResource
data ResourcesCalendarsPatch = ResourcesCalendarsPatch'
{ _rcpPayload :: !CalendarResource
, _rcpCustomer :: !Text
, _rcpCalendarResourceId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
resourcesCalendarsPatch
:: CalendarResource
-> Text
-> Text
-> ResourcesCalendarsPatch
resourcesCalendarsPatch pRcpPayload_ pRcpCustomer_ pRcpCalendarResourceId_ =
ResourcesCalendarsPatch'
{ _rcpPayload = pRcpPayload_
, _rcpCustomer = pRcpCustomer_
, _rcpCalendarResourceId = pRcpCalendarResourceId_
}
rcpPayload :: Lens' ResourcesCalendarsPatch CalendarResource
rcpPayload
= lens _rcpPayload (\ s a -> s{_rcpPayload = a})
rcpCustomer :: Lens' ResourcesCalendarsPatch Text
rcpCustomer
= lens _rcpCustomer (\ s a -> s{_rcpCustomer = a})
rcpCalendarResourceId :: Lens' ResourcesCalendarsPatch Text
rcpCalendarResourceId
= lens _rcpCalendarResourceId
(\ s a -> s{_rcpCalendarResourceId = a})
instance GoogleRequest ResourcesCalendarsPatch where
type Rs ResourcesCalendarsPatch = CalendarResource
type Scopes ResourcesCalendarsPatch =
'["https://www.googleapis.com/auth/admin.directory.resource.calendar"]
requestClient ResourcesCalendarsPatch'{..}
= go _rcpCustomer _rcpCalendarResourceId
(Just AltJSON)
_rcpPayload
directoryService
where go
= buildClient
(Proxy :: Proxy ResourcesCalendarsPatchResource)
mempty