{-# 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.Reseller.Subscriptions.Delete
(
SubscriptionsDeleteResource
, subscriptionsDelete
, SubscriptionsDelete
, sdCustomerId
, sdDeletionType
, sdSubscriptionId
) where
import Network.Google.AppsReseller.Types
import Network.Google.Prelude
type SubscriptionsDeleteResource =
"apps" :>
"reseller" :>
"v1" :>
"customers" :>
Capture "customerId" Text :>
"subscriptions" :>
Capture "subscriptionId" Text :>
QueryParam "deletionType"
SubscriptionsDeleteDeletionType
:> QueryParam "alt" AltJSON :> Delete '[JSON] ()
data SubscriptionsDelete = SubscriptionsDelete'
{ _sdCustomerId :: !Text
, _sdDeletionType :: !SubscriptionsDeleteDeletionType
, _sdSubscriptionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
subscriptionsDelete
:: Text
-> SubscriptionsDeleteDeletionType
-> Text
-> SubscriptionsDelete
subscriptionsDelete pSdCustomerId_ pSdDeletionType_ pSdSubscriptionId_ =
SubscriptionsDelete'
{ _sdCustomerId = pSdCustomerId_
, _sdDeletionType = pSdDeletionType_
, _sdSubscriptionId = pSdSubscriptionId_
}
sdCustomerId :: Lens' SubscriptionsDelete Text
sdCustomerId
= lens _sdCustomerId (\ s a -> s{_sdCustomerId = a})
sdDeletionType :: Lens' SubscriptionsDelete SubscriptionsDeleteDeletionType
sdDeletionType
= lens _sdDeletionType
(\ s a -> s{_sdDeletionType = a})
sdSubscriptionId :: Lens' SubscriptionsDelete Text
sdSubscriptionId
= lens _sdSubscriptionId
(\ s a -> s{_sdSubscriptionId = a})
instance GoogleRequest SubscriptionsDelete where
type Rs SubscriptionsDelete = ()
type Scopes SubscriptionsDelete =
'["https://www.googleapis.com/auth/apps.order"]
requestClient SubscriptionsDelete'{..}
= go _sdCustomerId _sdSubscriptionId
(Just _sdDeletionType)
(Just AltJSON)
appsResellerService
where go
= buildClient
(Proxy :: Proxy SubscriptionsDeleteResource)
mempty