module Network.AWS.CloudDirectory.DeleteSchema
(
deleteSchema
, DeleteSchema
, dsSchemaARN
, deleteSchemaResponse
, DeleteSchemaResponse
, dsrsSchemaARN
, dsrsResponseStatus
) where
import Network.AWS.CloudDirectory.Types
import Network.AWS.CloudDirectory.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteSchema = DeleteSchema'
{ _dsSchemaARN :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteSchema
:: Text
-> DeleteSchema
deleteSchema pSchemaARN_ = DeleteSchema' {_dsSchemaARN = pSchemaARN_}
dsSchemaARN :: Lens' DeleteSchema Text
dsSchemaARN = lens _dsSchemaARN (\ s a -> s{_dsSchemaARN = a});
instance AWSRequest DeleteSchema where
type Rs DeleteSchema = DeleteSchemaResponse
request = putJSON cloudDirectory
response
= receiveJSON
(\ s h x ->
DeleteSchemaResponse' <$>
(x .?> "SchemaArn") <*> (pure (fromEnum s)))
instance Hashable DeleteSchema where
instance NFData DeleteSchema where
instance ToHeaders DeleteSchema where
toHeaders DeleteSchema'{..}
= mconcat ["x-amz-data-partition" =# _dsSchemaARN]
instance ToJSON DeleteSchema where
toJSON = const (Object mempty)
instance ToPath DeleteSchema where
toPath
= const "/amazonclouddirectory/2017-01-11/schema"
instance ToQuery DeleteSchema where
toQuery = const mempty
data DeleteSchemaResponse = DeleteSchemaResponse'
{ _dsrsSchemaARN :: !(Maybe Text)
, _dsrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteSchemaResponse
:: Int
-> DeleteSchemaResponse
deleteSchemaResponse pResponseStatus_ =
DeleteSchemaResponse'
{_dsrsSchemaARN = Nothing, _dsrsResponseStatus = pResponseStatus_}
dsrsSchemaARN :: Lens' DeleteSchemaResponse (Maybe Text)
dsrsSchemaARN = lens _dsrsSchemaARN (\ s a -> s{_dsrsSchemaARN = a});
dsrsResponseStatus :: Lens' DeleteSchemaResponse Int
dsrsResponseStatus = lens _dsrsResponseStatus (\ s a -> s{_dsrsResponseStatus = a});
instance NFData DeleteSchemaResponse where