{-# 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.AdSenseHost.URLChannels.Delete
(
URLChannelsDeleteResource
, urlChannelsDelete
, URLChannelsDelete
, ucdURLChannelId
, ucdAdClientId
) where
import Network.Google.AdSenseHost.Types
import Network.Google.Prelude
type URLChannelsDeleteResource =
"adsensehost" :>
"v4.1" :>
"adclients" :>
Capture "adClientId" Text :>
"urlchannels" :>
Capture "urlChannelId" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] URLChannel
-- | Delete a URL channel from the host AdSense account.
--
-- /See:/ 'urlChannelsDelete' smart constructor.
data URLChannelsDelete = URLChannelsDelete'
{ _ucdURLChannelId :: !Text
, _ucdAdClientId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'URLChannelsDelete' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ucdURLChannelId'
--
-- * 'ucdAdClientId'
urlChannelsDelete
:: Text -- ^ 'ucdURLChannelId'
-> Text -- ^ 'ucdAdClientId'
-> URLChannelsDelete
urlChannelsDelete pUcdURLChannelId_ pUcdAdClientId_ =
URLChannelsDelete'
{ _ucdURLChannelId = pUcdURLChannelId_
, _ucdAdClientId = pUcdAdClientId_
}
-- | URL channel to delete.
ucdURLChannelId :: Lens' URLChannelsDelete Text
ucdURLChannelId
= lens _ucdURLChannelId
(\ s a -> s{_ucdURLChannelId = a})
-- | Ad client from which to delete the URL channel.
ucdAdClientId :: Lens' URLChannelsDelete Text
ucdAdClientId
= lens _ucdAdClientId
(\ s a -> s{_ucdAdClientId = a})
instance GoogleRequest URLChannelsDelete where
type Rs URLChannelsDelete = URLChannel
type Scopes URLChannelsDelete =
'["https://www.googleapis.com/auth/adsensehost"]
requestClient URLChannelsDelete'{..}
= go _ucdAdClientId _ucdURLChannelId (Just AltJSON)
adSenseHostService
where go
= buildClient
(Proxy :: Proxy URLChannelsDeleteResource)
mempty