{-# 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.PubSub.Projects.Topics.Delete
(
ProjectsTopicsDeleteResource
, projectsTopicsDelete
, ProjectsTopicsDelete
, ptdXgafv
, ptdUploadProtocol
, ptdAccessToken
, ptdUploadType
, ptdTopic
, ptdCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsTopicsDeleteResource =
"v1" :>
Capture "topic" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] Empty
data ProjectsTopicsDelete = ProjectsTopicsDelete'
{ _ptdXgafv :: !(Maybe Xgafv)
, _ptdUploadProtocol :: !(Maybe Text)
, _ptdAccessToken :: !(Maybe Text)
, _ptdUploadType :: !(Maybe Text)
, _ptdTopic :: !Text
, _ptdCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsTopicsDelete
:: Text
-> ProjectsTopicsDelete
projectsTopicsDelete pPtdTopic_ =
ProjectsTopicsDelete'
{ _ptdXgafv = Nothing
, _ptdUploadProtocol = Nothing
, _ptdAccessToken = Nothing
, _ptdUploadType = Nothing
, _ptdTopic = pPtdTopic_
, _ptdCallback = Nothing
}
ptdXgafv :: Lens' ProjectsTopicsDelete (Maybe Xgafv)
ptdXgafv = lens _ptdXgafv (\ s a -> s{_ptdXgafv = a})
ptdUploadProtocol :: Lens' ProjectsTopicsDelete (Maybe Text)
ptdUploadProtocol
= lens _ptdUploadProtocol
(\ s a -> s{_ptdUploadProtocol = a})
ptdAccessToken :: Lens' ProjectsTopicsDelete (Maybe Text)
ptdAccessToken
= lens _ptdAccessToken
(\ s a -> s{_ptdAccessToken = a})
ptdUploadType :: Lens' ProjectsTopicsDelete (Maybe Text)
ptdUploadType
= lens _ptdUploadType
(\ s a -> s{_ptdUploadType = a})
ptdTopic :: Lens' ProjectsTopicsDelete Text
ptdTopic = lens _ptdTopic (\ s a -> s{_ptdTopic = a})
ptdCallback :: Lens' ProjectsTopicsDelete (Maybe Text)
ptdCallback
= lens _ptdCallback (\ s a -> s{_ptdCallback = a})
instance GoogleRequest ProjectsTopicsDelete where
type Rs ProjectsTopicsDelete = Empty
type Scopes ProjectsTopicsDelete =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient ProjectsTopicsDelete'{..}
= go _ptdTopic _ptdXgafv _ptdUploadProtocol
_ptdAccessToken
_ptdUploadType
_ptdCallback
(Just AltJSON)
pubSubService
where go
= buildClient
(Proxy :: Proxy ProjectsTopicsDeleteResource)
mempty