{-# 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.Update
(
ResourcesCalendarsUpdateResource
, resourcesCalendarsUpdate
, ResourcesCalendarsUpdate
, rcuPayload
, rcuCustomer
, rcuCalendarResourceId
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type ResourcesCalendarsUpdateResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"resources" :>
"calendars" :>
Capture "calendarResourceId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CalendarResource :>
Put '[JSON] CalendarResource
data ResourcesCalendarsUpdate = ResourcesCalendarsUpdate'
{ _rcuPayload :: !CalendarResource
, _rcuCustomer :: !Text
, _rcuCalendarResourceId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
resourcesCalendarsUpdate
:: CalendarResource
-> Text
-> Text
-> ResourcesCalendarsUpdate
resourcesCalendarsUpdate pRcuPayload_ pRcuCustomer_ pRcuCalendarResourceId_ =
ResourcesCalendarsUpdate'
{ _rcuPayload = pRcuPayload_
, _rcuCustomer = pRcuCustomer_
, _rcuCalendarResourceId = pRcuCalendarResourceId_
}
rcuPayload :: Lens' ResourcesCalendarsUpdate CalendarResource
rcuPayload
= lens _rcuPayload (\ s a -> s{_rcuPayload = a})
rcuCustomer :: Lens' ResourcesCalendarsUpdate Text
rcuCustomer
= lens _rcuCustomer (\ s a -> s{_rcuCustomer = a})
rcuCalendarResourceId :: Lens' ResourcesCalendarsUpdate Text
rcuCalendarResourceId
= lens _rcuCalendarResourceId
(\ s a -> s{_rcuCalendarResourceId = a})
instance GoogleRequest ResourcesCalendarsUpdate where
type Rs ResourcesCalendarsUpdate = CalendarResource
type Scopes ResourcesCalendarsUpdate =
'["https://www.googleapis.com/auth/admin.directory.resource.calendar"]
requestClient ResourcesCalendarsUpdate'{..}
= go _rcuCustomer _rcuCalendarResourceId
(Just AltJSON)
_rcuPayload
directoryService
where go
= buildClient
(Proxy :: Proxy ResourcesCalendarsUpdateResource)
mempty