{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.ServiceCatalog.DeleteTagOption
(
deleteTagOption
, DeleteTagOption
, delId
, deleteTagOptionResponse
, DeleteTagOptionResponse
, dtotrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.ServiceCatalog.Types
import Network.AWS.ServiceCatalog.Types.Product
newtype DeleteTagOption = DeleteTagOption'
{ _delId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteTagOption
:: Text
-> DeleteTagOption
deleteTagOption pId_ = DeleteTagOption' {_delId = pId_}
delId :: Lens' DeleteTagOption Text
delId = lens _delId (\ s a -> s{_delId = a})
instance AWSRequest DeleteTagOption where
type Rs DeleteTagOption = DeleteTagOptionResponse
request = postJSON serviceCatalog
response
= receiveEmpty
(\ s h x ->
DeleteTagOptionResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteTagOption where
instance NFData DeleteTagOption where
instance ToHeaders DeleteTagOption where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWS242ServiceCatalogService.DeleteTagOption" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteTagOption where
toJSON DeleteTagOption'{..}
= object (catMaybes [Just ("Id" .= _delId)])
instance ToPath DeleteTagOption where
toPath = const "/"
instance ToQuery DeleteTagOption where
toQuery = const mempty
newtype DeleteTagOptionResponse = DeleteTagOptionResponse'
{ _dtotrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteTagOptionResponse
:: Int
-> DeleteTagOptionResponse
deleteTagOptionResponse pResponseStatus_ =
DeleteTagOptionResponse' {_dtotrsResponseStatus = pResponseStatus_}
dtotrsResponseStatus :: Lens' DeleteTagOptionResponse Int
dtotrsResponseStatus = lens _dtotrsResponseStatus (\ s a -> s{_dtotrsResponseStatus = a})
instance NFData DeleteTagOptionResponse where