module Network.Google.Resource.Coordinate.Location.List
(
LocationListResource
, locationList
, LocationList
, llWorkerEmail
, llStartTimestampMs
, llTeamId
, llPageToken
, llMaxResults
) where
import Network.Google.MapsCoordinate.Types
import Network.Google.Prelude
type LocationListResource =
"coordinate" :>
"v1" :>
"teams" :>
Capture "teamId" Text :>
"workers" :>
Capture "workerEmail" Text :>
"locations" :>
QueryParam "startTimestampMs" (Textual Word64) :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] LocationListResponse
data LocationList = LocationList'
{ _llWorkerEmail :: !Text
, _llStartTimestampMs :: !(Textual Word64)
, _llTeamId :: !Text
, _llPageToken :: !(Maybe Text)
, _llMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
locationList
:: Text
-> Word64
-> Text
-> LocationList
locationList pLlWorkerEmail_ pLlStartTimestampMs_ pLlTeamId_ =
LocationList'
{ _llWorkerEmail = pLlWorkerEmail_
, _llStartTimestampMs = _Coerce # pLlStartTimestampMs_
, _llTeamId = pLlTeamId_
, _llPageToken = Nothing
, _llMaxResults = Nothing
}
llWorkerEmail :: Lens' LocationList Text
llWorkerEmail
= lens _llWorkerEmail
(\ s a -> s{_llWorkerEmail = a})
llStartTimestampMs :: Lens' LocationList Word64
llStartTimestampMs
= lens _llStartTimestampMs
(\ s a -> s{_llStartTimestampMs = a})
. _Coerce
llTeamId :: Lens' LocationList Text
llTeamId = lens _llTeamId (\ s a -> s{_llTeamId = a})
llPageToken :: Lens' LocationList (Maybe Text)
llPageToken
= lens _llPageToken (\ s a -> s{_llPageToken = a})
llMaxResults :: Lens' LocationList (Maybe Word32)
llMaxResults
= lens _llMaxResults (\ s a -> s{_llMaxResults = a})
. mapping _Coerce
instance GoogleRequest LocationList where
type Rs LocationList = LocationListResponse
type Scopes LocationList =
'["https://www.googleapis.com/auth/coordinate",
"https://www.googleapis.com/auth/coordinate.readonly"]
requestClient LocationList'{..}
= go _llTeamId _llWorkerEmail
(Just _llStartTimestampMs)
_llPageToken
_llMaxResults
(Just AltJSON)
mapsCoordinateService
where go
= buildClient (Proxy :: Proxy LocationListResource)
mempty