module Network.Google.Resource.Coordinate.Jobs.Patch
(
JobsPatchResource
, jobsPatch
, JobsPatch
, jpJobId
, jpProgress
, jpNote
, jpTeamId
, jpCustomerPhoneNumber
, jpCustomerName
, jpAddress
, jpPayload
, jpAssignee
, jpLat
, jpLng
, jpTitle
, jpCustomField
) where
import Network.Google.MapsCoordinate.Types
import Network.Google.Prelude
type JobsPatchResource =
"coordinate" :>
"v1" :>
"teams" :>
Capture "teamId" Text :>
"jobs" :>
Capture "jobId" (Textual Word64) :>
QueryParam "progress" JobsPatchProgress :>
QueryParam "note" Text :>
QueryParam "customerPhoneNumber" Text :>
QueryParam "customerName" Text :>
QueryParam "address" Text :>
QueryParam "assignee" Text :>
QueryParam "lat" (Textual Double) :>
QueryParam "lng" (Textual Double) :>
QueryParam "title" Text :>
QueryParams "customField" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Job :> Patch '[JSON] Job
data JobsPatch = JobsPatch'
{ _jpJobId :: !(Textual Word64)
, _jpProgress :: !(Maybe JobsPatchProgress)
, _jpNote :: !(Maybe Text)
, _jpTeamId :: !Text
, _jpCustomerPhoneNumber :: !(Maybe Text)
, _jpCustomerName :: !(Maybe Text)
, _jpAddress :: !(Maybe Text)
, _jpPayload :: !Job
, _jpAssignee :: !(Maybe Text)
, _jpLat :: !(Maybe (Textual Double))
, _jpLng :: !(Maybe (Textual Double))
, _jpTitle :: !(Maybe Text)
, _jpCustomField :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
jobsPatch
:: Word64
-> Text
-> Job
-> JobsPatch
jobsPatch pJpJobId_ pJpTeamId_ pJpPayload_ =
JobsPatch'
{ _jpJobId = _Coerce # pJpJobId_
, _jpProgress = Nothing
, _jpNote = Nothing
, _jpTeamId = pJpTeamId_
, _jpCustomerPhoneNumber = Nothing
, _jpCustomerName = Nothing
, _jpAddress = Nothing
, _jpPayload = pJpPayload_
, _jpAssignee = Nothing
, _jpLat = Nothing
, _jpLng = Nothing
, _jpTitle = Nothing
, _jpCustomField = Nothing
}
jpJobId :: Lens' JobsPatch Word64
jpJobId
= lens _jpJobId (\ s a -> s{_jpJobId = a}) . _Coerce
jpProgress :: Lens' JobsPatch (Maybe JobsPatchProgress)
jpProgress
= lens _jpProgress (\ s a -> s{_jpProgress = a})
jpNote :: Lens' JobsPatch (Maybe Text)
jpNote = lens _jpNote (\ s a -> s{_jpNote = a})
jpTeamId :: Lens' JobsPatch Text
jpTeamId = lens _jpTeamId (\ s a -> s{_jpTeamId = a})
jpCustomerPhoneNumber :: Lens' JobsPatch (Maybe Text)
jpCustomerPhoneNumber
= lens _jpCustomerPhoneNumber
(\ s a -> s{_jpCustomerPhoneNumber = a})
jpCustomerName :: Lens' JobsPatch (Maybe Text)
jpCustomerName
= lens _jpCustomerName
(\ s a -> s{_jpCustomerName = a})
jpAddress :: Lens' JobsPatch (Maybe Text)
jpAddress
= lens _jpAddress (\ s a -> s{_jpAddress = a})
jpPayload :: Lens' JobsPatch Job
jpPayload
= lens _jpPayload (\ s a -> s{_jpPayload = a})
jpAssignee :: Lens' JobsPatch (Maybe Text)
jpAssignee
= lens _jpAssignee (\ s a -> s{_jpAssignee = a})
jpLat :: Lens' JobsPatch (Maybe Double)
jpLat
= lens _jpLat (\ s a -> s{_jpLat = a}) .
mapping _Coerce
jpLng :: Lens' JobsPatch (Maybe Double)
jpLng
= lens _jpLng (\ s a -> s{_jpLng = a}) .
mapping _Coerce
jpTitle :: Lens' JobsPatch (Maybe Text)
jpTitle = lens _jpTitle (\ s a -> s{_jpTitle = a})
jpCustomField :: Lens' JobsPatch [Text]
jpCustomField
= lens _jpCustomField
(\ s a -> s{_jpCustomField = a})
. _Default
. _Coerce
instance GoogleRequest JobsPatch where
type Rs JobsPatch = Job
type Scopes JobsPatch =
'["https://www.googleapis.com/auth/coordinate"]
requestClient JobsPatch'{..}
= go _jpTeamId _jpJobId _jpProgress _jpNote
_jpCustomerPhoneNumber
_jpCustomerName
_jpAddress
_jpAssignee
_jpLat
_jpLng
_jpTitle
(_jpCustomField ^. _Default)
(Just AltJSON)
_jpPayload
mapsCoordinateService
where go
= buildClient (Proxy :: Proxy JobsPatchResource)
mempty