{-# 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.Delete
(
SurveysDeleteResource
, surveysDelete
, SurveysDelete
, sdSurveyURLId
) where
import Network.Google.ConsumerSurveys.Types
import Network.Google.Prelude
type SurveysDeleteResource =
"consumersurveys" :>
"v2" :>
"surveys" :>
Capture "surveyUrlId" Text :>
QueryParam "alt" AltJSON :>
Delete '[JSON] SurveysDeleteResponse
newtype SurveysDelete = SurveysDelete'
{ _sdSurveyURLId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
surveysDelete
:: Text
-> SurveysDelete
surveysDelete pSdSurveyURLId_ =
SurveysDelete'
{ _sdSurveyURLId = pSdSurveyURLId_
}
sdSurveyURLId :: Lens' SurveysDelete Text
sdSurveyURLId
= lens _sdSurveyURLId
(\ s a -> s{_sdSurveyURLId = a})
instance GoogleRequest SurveysDelete where
type Rs SurveysDelete = SurveysDeleteResponse
type Scopes SurveysDelete =
'["https://www.googleapis.com/auth/consumersurveys",
"https://www.googleapis.com/auth/userinfo.email"]
requestClient SurveysDelete'{..}
= go _sdSurveyURLId (Just AltJSON)
consumerSurveysService
where go
= buildClient (Proxy :: Proxy SurveysDeleteResource)
mempty