{-# 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.DynamoDB.DescribeContinuousBackups
(
describeContinuousBackups
, DescribeContinuousBackups
, dcbTableName
, describeContinuousBackupsResponse
, DescribeContinuousBackupsResponse
, dcbrsContinuousBackupsDescription
, dcbrsResponseStatus
) where
import Network.AWS.DynamoDB.Types
import Network.AWS.DynamoDB.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DescribeContinuousBackups = DescribeContinuousBackups'
{ _dcbTableName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeContinuousBackups
:: Text
-> DescribeContinuousBackups
describeContinuousBackups pTableName_ =
DescribeContinuousBackups' {_dcbTableName = pTableName_}
dcbTableName :: Lens' DescribeContinuousBackups Text
dcbTableName = lens _dcbTableName (\ s a -> s{_dcbTableName = a})
instance AWSRequest DescribeContinuousBackups where
type Rs DescribeContinuousBackups =
DescribeContinuousBackupsResponse
request = postJSON dynamoDB
response
= receiveJSON
(\ s h x ->
DescribeContinuousBackupsResponse' <$>
(x .?> "ContinuousBackupsDescription") <*>
(pure (fromEnum s)))
instance Hashable DescribeContinuousBackups where
instance NFData DescribeContinuousBackups where
instance ToHeaders DescribeContinuousBackups where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("DynamoDB_20120810.DescribeContinuousBackups" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.0" :: ByteString)])
instance ToJSON DescribeContinuousBackups where
toJSON DescribeContinuousBackups'{..}
= object
(catMaybes [Just ("TableName" .= _dcbTableName)])
instance ToPath DescribeContinuousBackups where
toPath = const "/"
instance ToQuery DescribeContinuousBackups where
toQuery = const mempty
data DescribeContinuousBackupsResponse = DescribeContinuousBackupsResponse'
{ _dcbrsContinuousBackupsDescription :: !(Maybe ContinuousBackupsDescription)
, _dcbrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeContinuousBackupsResponse
:: Int
-> DescribeContinuousBackupsResponse
describeContinuousBackupsResponse pResponseStatus_ =
DescribeContinuousBackupsResponse'
{ _dcbrsContinuousBackupsDescription = Nothing
, _dcbrsResponseStatus = pResponseStatus_
}
dcbrsContinuousBackupsDescription :: Lens' DescribeContinuousBackupsResponse (Maybe ContinuousBackupsDescription)
dcbrsContinuousBackupsDescription = lens _dcbrsContinuousBackupsDescription (\ s a -> s{_dcbrsContinuousBackupsDescription = a})
dcbrsResponseStatus :: Lens' DescribeContinuousBackupsResponse Int
dcbrsResponseStatus = lens _dcbrsResponseStatus (\ s a -> s{_dcbrsResponseStatus = a})
instance NFData DescribeContinuousBackupsResponse
where