{-# 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.Mirror.Timeline.Patch
(
TimelinePatchResource
, timelinePatch
, TimelinePatch
, tpPayload
, tpId
) where
import Network.Google.Mirror.Types
import Network.Google.Prelude
type TimelinePatchResource =
"mirror" :>
"v1" :>
"timeline" :>
Capture "id" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TimelineItem :>
Patch '[JSON] TimelineItem
data TimelinePatch = TimelinePatch'
{ _tpPayload :: !TimelineItem
, _tpId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
timelinePatch
:: TimelineItem
-> Text
-> TimelinePatch
timelinePatch pTpPayload_ pTpId_ =
TimelinePatch'
{ _tpPayload = pTpPayload_
, _tpId = pTpId_
}
tpPayload :: Lens' TimelinePatch TimelineItem
tpPayload
= lens _tpPayload (\ s a -> s{_tpPayload = a})
tpId :: Lens' TimelinePatch Text
tpId = lens _tpId (\ s a -> s{_tpId = a})
instance GoogleRequest TimelinePatch where
type Rs TimelinePatch = TimelineItem
type Scopes TimelinePatch =
'["https://www.googleapis.com/auth/glass.location",
"https://www.googleapis.com/auth/glass.timeline"]
requestClient TimelinePatch'{..}
= go _tpId (Just AltJSON) _tpPayload mirrorService
where go
= buildClient (Proxy :: Proxy TimelinePatchResource)
mempty