{-# 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.List
(
SurveysListResource
, surveysList
, SurveysList
, slToken
, slStartIndex
, slMaxResults
) where
import Network.Google.ConsumerSurveys.Types
import Network.Google.Prelude
type SurveysListResource =
"consumersurveys" :>
"v2" :>
"surveys" :>
QueryParam "token" Text :>
QueryParam "startIndex" (Textual Word32) :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] SurveysListResponse
data SurveysList = SurveysList'
{ _slToken :: !(Maybe Text)
, _slStartIndex :: !(Maybe (Textual Word32))
, _slMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
surveysList
:: SurveysList
surveysList =
SurveysList'
{ _slToken = Nothing
, _slStartIndex = Nothing
, _slMaxResults = Nothing
}
slToken :: Lens' SurveysList (Maybe Text)
slToken = lens _slToken (\ s a -> s{_slToken = a})
slStartIndex :: Lens' SurveysList (Maybe Word32)
slStartIndex
= lens _slStartIndex (\ s a -> s{_slStartIndex = a})
. mapping _Coerce
slMaxResults :: Lens' SurveysList (Maybe Word32)
slMaxResults
= lens _slMaxResults (\ s a -> s{_slMaxResults = a})
. mapping _Coerce
instance GoogleRequest SurveysList where
type Rs SurveysList = SurveysListResponse
type Scopes SurveysList =
'["https://www.googleapis.com/auth/consumersurveys",
"https://www.googleapis.com/auth/consumersurveys.readonly",
"https://www.googleapis.com/auth/userinfo.email"]
requestClient SurveysList'{..}
= go _slToken _slStartIndex _slMaxResults
(Just AltJSON)
consumerSurveysService
where go
= buildClient (Proxy :: Proxy SurveysListResource)
mempty