{-# 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.S3.PutBucketNotificationConfiguration
(
putBucketNotificationConfiguration
, PutBucketNotificationConfiguration
, pbncBucket
, pbncNotificationConfiguration
, putBucketNotificationConfigurationResponse
, PutBucketNotificationConfigurationResponse
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.S3.Types
import Network.AWS.S3.Types.Product
data PutBucketNotificationConfiguration = PutBucketNotificationConfiguration'
{ _pbncBucket :: !BucketName
, _pbncNotificationConfiguration :: !NotificationConfiguration
} deriving (Eq, Read, Show, Data, Typeable, Generic)
putBucketNotificationConfiguration
:: BucketName
-> NotificationConfiguration
-> PutBucketNotificationConfiguration
putBucketNotificationConfiguration pBucket_ pNotificationConfiguration_ =
PutBucketNotificationConfiguration'
{ _pbncBucket = pBucket_
, _pbncNotificationConfiguration = pNotificationConfiguration_
}
pbncBucket :: Lens' PutBucketNotificationConfiguration BucketName
pbncBucket = lens _pbncBucket (\ s a -> s{_pbncBucket = a})
pbncNotificationConfiguration :: Lens' PutBucketNotificationConfiguration NotificationConfiguration
pbncNotificationConfiguration = lens _pbncNotificationConfiguration (\ s a -> s{_pbncNotificationConfiguration = a})
instance AWSRequest
PutBucketNotificationConfiguration
where
type Rs PutBucketNotificationConfiguration =
PutBucketNotificationConfigurationResponse
request = putXML s3
response
= receiveNull
PutBucketNotificationConfigurationResponse'
instance Hashable PutBucketNotificationConfiguration
where
instance NFData PutBucketNotificationConfiguration
where
instance ToElement PutBucketNotificationConfiguration
where
toElement
= mkElement
"{http://s3.amazonaws.com/doc/2006-03-01/}NotificationConfiguration"
.
_pbncNotificationConfiguration
instance ToHeaders PutBucketNotificationConfiguration
where
toHeaders = const mempty
instance ToPath PutBucketNotificationConfiguration
where
toPath PutBucketNotificationConfiguration'{..}
= mconcat ["/", toBS _pbncBucket]
instance ToQuery PutBucketNotificationConfiguration
where
toQuery = const (mconcat ["notification"])
data PutBucketNotificationConfigurationResponse =
PutBucketNotificationConfigurationResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
putBucketNotificationConfigurationResponse
:: PutBucketNotificationConfigurationResponse
putBucketNotificationConfigurationResponse =
PutBucketNotificationConfigurationResponse'
instance NFData
PutBucketNotificationConfigurationResponse
where