{-# 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.Surveys.Surveys.Get
(
SurveysGetResource
, surveysGet
, SurveysGet
, sgSurveyURLId
) where
import Network.Google.Prelude
import Network.Google.Surveys.Types
type SurveysGetResource =
"surveys" :>
"v2" :>
"surveys" :>
Capture "surveyUrlId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Survey
newtype SurveysGet = SurveysGet'
{ _sgSurveyURLId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
surveysGet
:: Text
-> SurveysGet
surveysGet pSgSurveyURLId_ =
SurveysGet'
{ _sgSurveyURLId = pSgSurveyURLId_
}
sgSurveyURLId :: Lens' SurveysGet Text
sgSurveyURLId
= lens _sgSurveyURLId
(\ s a -> s{_sgSurveyURLId = a})
instance GoogleRequest SurveysGet where
type Rs SurveysGet = Survey
type Scopes SurveysGet =
'["https://www.googleapis.com/auth/surveys",
"https://www.googleapis.com/auth/surveys.readonly",
"https://www.googleapis.com/auth/userinfo.email"]
requestClient SurveysGet'{..}
= go _sgSurveyURLId (Just AltJSON) surveysService
where go
= buildClient (Proxy :: Proxy SurveysGetResource)
mempty