{-# 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.Subscriptions.Delete
(
ProjectsSubscriptionsDeleteResource
, projectsSubscriptionsDelete
, ProjectsSubscriptionsDelete
, psdXgafv
, psdUploadProtocol
, psdAccessToken
, psdUploadType
, psdSubscription
, psdCallback
) where
import Network.Google.Prelude
import Network.Google.PubSub.Types
type ProjectsSubscriptionsDeleteResource =
"v1" :>
Capture "subscription" 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 ProjectsSubscriptionsDelete = ProjectsSubscriptionsDelete'
{ _psdXgafv :: !(Maybe Xgafv)
, _psdUploadProtocol :: !(Maybe Text)
, _psdAccessToken :: !(Maybe Text)
, _psdUploadType :: !(Maybe Text)
, _psdSubscription :: !Text
, _psdCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsSubscriptionsDelete
:: Text
-> ProjectsSubscriptionsDelete
projectsSubscriptionsDelete pPsdSubscription_ =
ProjectsSubscriptionsDelete'
{ _psdXgafv = Nothing
, _psdUploadProtocol = Nothing
, _psdAccessToken = Nothing
, _psdUploadType = Nothing
, _psdSubscription = pPsdSubscription_
, _psdCallback = Nothing
}
psdXgafv :: Lens' ProjectsSubscriptionsDelete (Maybe Xgafv)
psdXgafv = lens _psdXgafv (\ s a -> s{_psdXgafv = a})
psdUploadProtocol :: Lens' ProjectsSubscriptionsDelete (Maybe Text)
psdUploadProtocol
= lens _psdUploadProtocol
(\ s a -> s{_psdUploadProtocol = a})
psdAccessToken :: Lens' ProjectsSubscriptionsDelete (Maybe Text)
psdAccessToken
= lens _psdAccessToken
(\ s a -> s{_psdAccessToken = a})
psdUploadType :: Lens' ProjectsSubscriptionsDelete (Maybe Text)
psdUploadType
= lens _psdUploadType
(\ s a -> s{_psdUploadType = a})
psdSubscription :: Lens' ProjectsSubscriptionsDelete Text
psdSubscription
= lens _psdSubscription
(\ s a -> s{_psdSubscription = a})
psdCallback :: Lens' ProjectsSubscriptionsDelete (Maybe Text)
psdCallback
= lens _psdCallback (\ s a -> s{_psdCallback = a})
instance GoogleRequest ProjectsSubscriptionsDelete
where
type Rs ProjectsSubscriptionsDelete = Empty
type Scopes ProjectsSubscriptionsDelete =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/pubsub"]
requestClient ProjectsSubscriptionsDelete'{..}
= go _psdSubscription _psdXgafv _psdUploadProtocol
_psdAccessToken
_psdUploadType
_psdCallback
(Just AltJSON)
pubSubService
where go
= buildClient
(Proxy :: Proxy ProjectsSubscriptionsDeleteResource)
mempty