{-# 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.HeadBucket
(
headBucket
, HeadBucket
, hbBucket
, headBucketResponse
, HeadBucketResponse
) 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
newtype HeadBucket = HeadBucket'
{ _hbBucket :: BucketName
} deriving (Eq, Read, Show, Data, Typeable, Generic)
headBucket
:: BucketName
-> HeadBucket
headBucket pBucket_ = HeadBucket' {_hbBucket = pBucket_}
hbBucket :: Lens' HeadBucket BucketName
hbBucket = lens _hbBucket (\ s a -> s{_hbBucket = a})
instance AWSRequest HeadBucket where
type Rs HeadBucket = HeadBucketResponse
request = head' s3
response = receiveNull HeadBucketResponse'
instance Hashable HeadBucket where
instance NFData HeadBucket where
instance ToHeaders HeadBucket where
toHeaders = const mempty
instance ToPath HeadBucket where
toPath HeadBucket'{..}
= mconcat ["/", toBS _hbBucket]
instance ToQuery HeadBucket where
toQuery = const mempty
data HeadBucketResponse =
HeadBucketResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
headBucketResponse
:: HeadBucketResponse
headBucketResponse = HeadBucketResponse'
instance NFData HeadBucketResponse where