{-# 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.Coordinate.Jobs.Get
(
JobsGetResource
, jobsGet
, JobsGet
, jgJobId
, jgTeamId
) where
import Network.Google.MapsCoordinate.Types
import Network.Google.Prelude
type JobsGetResource =
"coordinate" :>
"v1" :>
"teams" :>
Capture "teamId" Text :>
"jobs" :>
Capture "jobId" (Textual Word64) :>
QueryParam "alt" AltJSON :> Get '[JSON] Job
-- | Retrieves a job, including all the changes made to the job.
--
-- /See:/ 'jobsGet' smart constructor.
data JobsGet = JobsGet'
{ _jgJobId :: !(Textual Word64)
, _jgTeamId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'JobsGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'jgJobId'
--
-- * 'jgTeamId'
jobsGet
:: Word64 -- ^ 'jgJobId'
-> Text -- ^ 'jgTeamId'
-> JobsGet
jobsGet pJgJobId_ pJgTeamId_ =
JobsGet'
{ _jgJobId = _Coerce # pJgJobId_
, _jgTeamId = pJgTeamId_
}
-- | Job number
jgJobId :: Lens' JobsGet Word64
jgJobId
= lens _jgJobId (\ s a -> s{_jgJobId = a}) . _Coerce
-- | Team ID
jgTeamId :: Lens' JobsGet Text
jgTeamId = lens _jgTeamId (\ s a -> s{_jgTeamId = a})
instance GoogleRequest JobsGet where
type Rs JobsGet = Job
type Scopes JobsGet =
'["https://www.googleapis.com/auth/coordinate",
"https://www.googleapis.com/auth/coordinate.readonly"]
requestClient JobsGet'{..}
= go _jgTeamId _jgJobId (Just AltJSON)
mapsCoordinateService
where go
= buildClient (Proxy :: Proxy JobsGetResource) mempty