{-# 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.ConsumerSurveys.Surveys.Get
(
SurveysGetResource
, surveysGet
, SurveysGet
, sgSurveyURLId
) where
import Network.Google.ConsumerSurveys.Types
import Network.Google.Prelude
type SurveysGetResource =
"consumersurveys" :>
"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/consumersurveys",
"https://www.googleapis.com/auth/consumersurveys.readonly",
"https://www.googleapis.com/auth/userinfo.email"]
requestClient SurveysGet'{..}
= go _sgSurveyURLId (Just AltJSON)
consumerSurveysService
where go
= buildClient (Proxy :: Proxy SurveysGetResource)
mempty