module Network.Google.Resource.Coordinate.Schedule.Patch
(
SchedulePatchResource
, schedulePatch
, SchedulePatch
, spJobId
, spAllDay
, spStartTime
, spTeamId
, spPayload
, spEndTime
, spDuration
) where
import Network.Google.MapsCoordinate.Types
import Network.Google.Prelude
type SchedulePatchResource =
"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 :> Patch '[JSON] Schedule
data SchedulePatch = SchedulePatch'
{ _spJobId :: !(Textual Word64)
, _spAllDay :: !(Maybe Bool)
, _spStartTime :: !(Maybe (Textual Word64))
, _spTeamId :: !Text
, _spPayload :: !Schedule
, _spEndTime :: !(Maybe (Textual Word64))
, _spDuration :: !(Maybe (Textual Word64))
} deriving (Eq,Show,Data,Typeable,Generic)
schedulePatch
:: Word64
-> Text
-> Schedule
-> SchedulePatch
schedulePatch pSpJobId_ pSpTeamId_ pSpPayload_ =
SchedulePatch'
{ _spJobId = _Coerce # pSpJobId_
, _spAllDay = Nothing
, _spStartTime = Nothing
, _spTeamId = pSpTeamId_
, _spPayload = pSpPayload_
, _spEndTime = Nothing
, _spDuration = Nothing
}
spJobId :: Lens' SchedulePatch Word64
spJobId
= lens _spJobId (\ s a -> s{_spJobId = a}) . _Coerce
spAllDay :: Lens' SchedulePatch (Maybe Bool)
spAllDay = lens _spAllDay (\ s a -> s{_spAllDay = a})
spStartTime :: Lens' SchedulePatch (Maybe Word64)
spStartTime
= lens _spStartTime (\ s a -> s{_spStartTime = a}) .
mapping _Coerce
spTeamId :: Lens' SchedulePatch Text
spTeamId = lens _spTeamId (\ s a -> s{_spTeamId = a})
spPayload :: Lens' SchedulePatch Schedule
spPayload
= lens _spPayload (\ s a -> s{_spPayload = a})
spEndTime :: Lens' SchedulePatch (Maybe Word64)
spEndTime
= lens _spEndTime (\ s a -> s{_spEndTime = a}) .
mapping _Coerce
spDuration :: Lens' SchedulePatch (Maybe Word64)
spDuration
= lens _spDuration (\ s a -> s{_spDuration = a}) .
mapping _Coerce
instance GoogleRequest SchedulePatch where
type Rs SchedulePatch = Schedule
type Scopes SchedulePatch =
'["https://www.googleapis.com/auth/coordinate"]
requestClient SchedulePatch'{..}
= go _spTeamId _spJobId _spAllDay _spStartTime
_spEndTime
_spDuration
(Just AltJSON)
_spPayload
mapsCoordinateService
where go
= buildClient (Proxy :: Proxy SchedulePatchResource)
mempty