{-# 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.AppSync.DeleteType
(
deleteType
, DeleteType
, dtApiId
, dtTypeName
, deleteTypeResponse
, DeleteTypeResponse
, dtrsResponseStatus
) where
import Network.AWS.AppSync.Types
import Network.AWS.AppSync.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteType = DeleteType'
{ _dtApiId :: !Text
, _dtTypeName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteType
:: Text
-> Text
-> DeleteType
deleteType pApiId_ pTypeName_ =
DeleteType' {_dtApiId = pApiId_, _dtTypeName = pTypeName_}
dtApiId :: Lens' DeleteType Text
dtApiId = lens _dtApiId (\ s a -> s{_dtApiId = a})
dtTypeName :: Lens' DeleteType Text
dtTypeName = lens _dtTypeName (\ s a -> s{_dtTypeName = a})
instance AWSRequest DeleteType where
type Rs DeleteType = DeleteTypeResponse
request = delete appSync
response
= receiveEmpty
(\ s h x ->
DeleteTypeResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteType where
instance NFData DeleteType where
instance ToHeaders DeleteType where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath DeleteType where
toPath DeleteType'{..}
= mconcat
["/v1/apis/", toBS _dtApiId, "/types/",
toBS _dtTypeName]
instance ToQuery DeleteType where
toQuery = const mempty
newtype DeleteTypeResponse = DeleteTypeResponse'
{ _dtrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteTypeResponse
:: Int
-> DeleteTypeResponse
deleteTypeResponse pResponseStatus_ =
DeleteTypeResponse' {_dtrsResponseStatus = pResponseStatus_}
dtrsResponseStatus :: Lens' DeleteTypeResponse Int
dtrsResponseStatus = lens _dtrsResponseStatus (\ s a -> s{_dtrsResponseStatus = a})
instance NFData DeleteTypeResponse where