{-# 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.PutBucketAnalyticsConfiguration
(
putBucketAnalyticsConfiguration
, PutBucketAnalyticsConfiguration
, pBucket
, pId
, pAnalyticsConfiguration
, putBucketAnalyticsConfigurationResponse
, PutBucketAnalyticsConfigurationResponse
) 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 PutBucketAnalyticsConfiguration = PutBucketAnalyticsConfiguration'
{ _pBucket :: !BucketName
, _pId :: !Text
, _pAnalyticsConfiguration :: !AnalyticsConfiguration
} deriving (Eq, Read, Show, Data, Typeable, Generic)
putBucketAnalyticsConfiguration
:: BucketName
-> Text
-> AnalyticsConfiguration
-> PutBucketAnalyticsConfiguration
putBucketAnalyticsConfiguration pBucket_ pId_ pAnalyticsConfiguration_ =
PutBucketAnalyticsConfiguration'
{ _pBucket = pBucket_
, _pId = pId_
, _pAnalyticsConfiguration = pAnalyticsConfiguration_
}
pBucket :: Lens' PutBucketAnalyticsConfiguration BucketName
pBucket = lens _pBucket (\ s a -> s{_pBucket = a})
pId :: Lens' PutBucketAnalyticsConfiguration Text
pId = lens _pId (\ s a -> s{_pId = a})
pAnalyticsConfiguration :: Lens' PutBucketAnalyticsConfiguration AnalyticsConfiguration
pAnalyticsConfiguration = lens _pAnalyticsConfiguration (\ s a -> s{_pAnalyticsConfiguration = a})
instance AWSRequest PutBucketAnalyticsConfiguration
where
type Rs PutBucketAnalyticsConfiguration =
PutBucketAnalyticsConfigurationResponse
request = putXML s3
response
= receiveNull
PutBucketAnalyticsConfigurationResponse'
instance Hashable PutBucketAnalyticsConfiguration
where
instance NFData PutBucketAnalyticsConfiguration where
instance ToElement PutBucketAnalyticsConfiguration
where
toElement
= mkElement
"{http://s3.amazonaws.com/doc/2006-03-01/}AnalyticsConfiguration"
.
_pAnalyticsConfiguration
instance ToHeaders PutBucketAnalyticsConfiguration
where
toHeaders = const mempty
instance ToPath PutBucketAnalyticsConfiguration where
toPath PutBucketAnalyticsConfiguration'{..}
= mconcat ["/", toBS _pBucket]
instance ToQuery PutBucketAnalyticsConfiguration
where
toQuery PutBucketAnalyticsConfiguration'{..}
= mconcat ["id" =: _pId, "analytics"]
data PutBucketAnalyticsConfigurationResponse =
PutBucketAnalyticsConfigurationResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
putBucketAnalyticsConfigurationResponse
:: PutBucketAnalyticsConfigurationResponse
putBucketAnalyticsConfigurationResponse =
PutBucketAnalyticsConfigurationResponse'
instance NFData
PutBucketAnalyticsConfigurationResponse
where