module Network.Google.Resource.Coordinate.Schedule.Update
(
ScheduleUpdateResource
, scheduleUpdate
, ScheduleUpdate
, suJobId
, suAllDay
, suStartTime
, suTeamId
, suPayload
, suEndTime
, suDuration
) where
import Network.Google.MapsCoordinate.Types
import Network.Google.Prelude
type ScheduleUpdateResource =
"coordinate" :>
"v1" :>
"teams" :>
Capture "teamId" Text :>
"jobs" :>
Capture "jobId" (Textual Word64) :>
"schedule" :>
QueryParam "allDay" Bool :>
QueryParam "startTime" (Textual Word64) :>
QueryParam "endTime" (Textual Word64) :>
QueryParam "duration" (Textual Word64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Schedule :> Put '[JSON] Schedule
data ScheduleUpdate = ScheduleUpdate'
{ _suJobId :: !(Textual Word64)
, _suAllDay :: !(Maybe Bool)
, _suStartTime :: !(Maybe (Textual Word64))
, _suTeamId :: !Text
, _suPayload :: !Schedule
, _suEndTime :: !(Maybe (Textual Word64))
, _suDuration :: !(Maybe (Textual Word64))
} deriving (Eq,Show,Data,Typeable,Generic)
scheduleUpdate
:: Word64
-> Text
-> Schedule
-> ScheduleUpdate
scheduleUpdate pSuJobId_ pSuTeamId_ pSuPayload_ =
ScheduleUpdate'
{ _suJobId = _Coerce # pSuJobId_
, _suAllDay = Nothing
, _suStartTime = Nothing
, _suTeamId = pSuTeamId_
, _suPayload = pSuPayload_
, _suEndTime = Nothing
, _suDuration = Nothing
}
suJobId :: Lens' ScheduleUpdate Word64
suJobId
= lens _suJobId (\ s a -> s{_suJobId = a}) . _Coerce
suAllDay :: Lens' ScheduleUpdate (Maybe Bool)
suAllDay = lens _suAllDay (\ s a -> s{_suAllDay = a})
suStartTime :: Lens' ScheduleUpdate (Maybe Word64)
suStartTime
= lens _suStartTime (\ s a -> s{_suStartTime = a}) .
mapping _Coerce
suTeamId :: Lens' ScheduleUpdate Text
suTeamId = lens _suTeamId (\ s a -> s{_suTeamId = a})
suPayload :: Lens' ScheduleUpdate Schedule
suPayload
= lens _suPayload (\ s a -> s{_suPayload = a})
suEndTime :: Lens' ScheduleUpdate (Maybe Word64)
suEndTime
= lens _suEndTime (\ s a -> s{_suEndTime = a}) .
mapping _Coerce
suDuration :: Lens' ScheduleUpdate (Maybe Word64)
suDuration
= lens _suDuration (\ s a -> s{_suDuration = a}) .
mapping _Coerce
instance GoogleRequest ScheduleUpdate where
type Rs ScheduleUpdate = Schedule
type Scopes ScheduleUpdate =
'["https://www.googleapis.com/auth/coordinate"]
requestClient ScheduleUpdate'{..}
= go _suTeamId _suJobId _suAllDay _suStartTime
_suEndTime
_suDuration
(Just AltJSON)
_suPayload
mapsCoordinateService
where go
= buildClient (Proxy :: Proxy ScheduleUpdateResource)
mempty