module Network.AWS.Config.DescribeDeliveryChannelStatus
(
DescribeDeliveryChannelStatus
, describeDeliveryChannelStatus
, ddcsDeliveryChannelNames
, DescribeDeliveryChannelStatusResponse
, describeDeliveryChannelStatusResponse
, ddcsrDeliveryChannelsStatus
) where
import Network.AWS.Prelude
import Network.AWS.Request.JSON
import Network.AWS.Config.Types
import qualified GHC.Exts
newtype DescribeDeliveryChannelStatus = DescribeDeliveryChannelStatus
{ _ddcsDeliveryChannelNames :: List "DeliveryChannelNames" Text
} deriving (Eq, Ord, Read, Show, Monoid, Semigroup)
instance GHC.Exts.IsList DescribeDeliveryChannelStatus where
type Item DescribeDeliveryChannelStatus = Text
fromList = DescribeDeliveryChannelStatus . GHC.Exts.fromList
toList = GHC.Exts.toList . _ddcsDeliveryChannelNames
describeDeliveryChannelStatus :: DescribeDeliveryChannelStatus
describeDeliveryChannelStatus = DescribeDeliveryChannelStatus
{ _ddcsDeliveryChannelNames = mempty
}
ddcsDeliveryChannelNames :: Lens' DescribeDeliveryChannelStatus [Text]
ddcsDeliveryChannelNames =
lens _ddcsDeliveryChannelNames
(\s a -> s { _ddcsDeliveryChannelNames = a })
. _List
newtype DescribeDeliveryChannelStatusResponse = DescribeDeliveryChannelStatusResponse
{ _ddcsrDeliveryChannelsStatus :: List "DeliveryChannelsStatus" DeliveryChannelStatus
} deriving (Eq, Read, Show, Monoid, Semigroup)
instance GHC.Exts.IsList DescribeDeliveryChannelStatusResponse where
type Item DescribeDeliveryChannelStatusResponse = DeliveryChannelStatus
fromList = DescribeDeliveryChannelStatusResponse . GHC.Exts.fromList
toList = GHC.Exts.toList . _ddcsrDeliveryChannelsStatus
describeDeliveryChannelStatusResponse :: DescribeDeliveryChannelStatusResponse
describeDeliveryChannelStatusResponse = DescribeDeliveryChannelStatusResponse
{ _ddcsrDeliveryChannelsStatus = mempty
}
ddcsrDeliveryChannelsStatus :: Lens' DescribeDeliveryChannelStatusResponse [DeliveryChannelStatus]
ddcsrDeliveryChannelsStatus =
lens _ddcsrDeliveryChannelsStatus
(\s a -> s { _ddcsrDeliveryChannelsStatus = a })
. _List
instance ToPath DescribeDeliveryChannelStatus where
toPath = const "/"
instance ToQuery DescribeDeliveryChannelStatus where
toQuery = const mempty
instance ToHeaders DescribeDeliveryChannelStatus
instance ToJSON DescribeDeliveryChannelStatus where
toJSON DescribeDeliveryChannelStatus{..} = object
[ "DeliveryChannelNames" .= _ddcsDeliveryChannelNames
]
instance AWSRequest DescribeDeliveryChannelStatus where
type Sv DescribeDeliveryChannelStatus = Config
type Rs DescribeDeliveryChannelStatus = DescribeDeliveryChannelStatusResponse
request = post "DescribeDeliveryChannelStatus"
response = jsonResponse
instance FromJSON DescribeDeliveryChannelStatusResponse where
parseJSON = withObject "DescribeDeliveryChannelStatusResponse" $ \o -> DescribeDeliveryChannelStatusResponse
<$> o .:? "DeliveryChannelsStatus" .!= mempty