-
-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerating S3 from latest service definition
- Loading branch information
1 parent
1cf245d
commit 3e65f86
Showing
13 changed files
with
382 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
126 changes: 126 additions & 0 deletions
126
amazonka-s3/gen/Network/AWS/S3/GetBucketAccelerateConfiguration.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
{-# 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 #-} | ||
|
||
-- Derived from AWS service descriptions, licensed under Apache 2.0. | ||
|
||
-- | | ||
-- Module : Network.AWS.S3.GetBucketAccelerateConfiguration | ||
-- Copyright : (c) 2013-2016 Brendan Hay | ||
-- License : Mozilla Public License, v. 2.0. | ||
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> | ||
-- Stability : auto-generated | ||
-- Portability : non-portable (GHC extensions) | ||
-- | ||
-- Returns the accelerate configuration of a bucket. | ||
module Network.AWS.S3.GetBucketAccelerateConfiguration | ||
( | ||
-- * Creating a Request | ||
getBucketAccelerateConfiguration | ||
, GetBucketAccelerateConfiguration | ||
-- * Request Lenses | ||
, gbacBucket | ||
|
||
-- * Destructuring the Response | ||
, getBucketAccelerateConfigurationResponse | ||
, GetBucketAccelerateConfigurationResponse | ||
-- * Response Lenses | ||
, gbacrsStatus | ||
, gbacrsResponseStatus | ||
) 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 | ||
|
||
-- | /See:/ 'getBucketAccelerateConfiguration' smart constructor. | ||
newtype GetBucketAccelerateConfiguration = GetBucketAccelerateConfiguration' | ||
{ _gbacBucket :: BucketName | ||
} deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'GetBucketAccelerateConfiguration' with the minimum fields required to make a request. | ||
-- | ||
-- Use one of the following lenses to modify other fields as desired: | ||
-- | ||
-- * 'gbacBucket' | ||
getBucketAccelerateConfiguration | ||
:: BucketName -- ^ 'gbacBucket' | ||
-> GetBucketAccelerateConfiguration | ||
getBucketAccelerateConfiguration pBucket_ = | ||
GetBucketAccelerateConfiguration' | ||
{ _gbacBucket = pBucket_ | ||
} | ||
|
||
-- | Name of the bucket for which the accelerate configuration is retrieved. | ||
gbacBucket :: Lens' GetBucketAccelerateConfiguration BucketName | ||
gbacBucket = lens _gbacBucket (\ s a -> s{_gbacBucket = a}); | ||
|
||
instance AWSRequest GetBucketAccelerateConfiguration | ||
where | ||
type Rs GetBucketAccelerateConfiguration = | ||
GetBucketAccelerateConfigurationResponse | ||
request = get s3 | ||
response | ||
= receiveXML | ||
(\ s h x -> | ||
GetBucketAccelerateConfigurationResponse' <$> | ||
(x .@? "Status") <*> (pure (fromEnum s))) | ||
|
||
instance Hashable GetBucketAccelerateConfiguration | ||
|
||
instance NFData GetBucketAccelerateConfiguration | ||
|
||
instance ToHeaders GetBucketAccelerateConfiguration | ||
where | ||
toHeaders = const mempty | ||
|
||
instance ToPath GetBucketAccelerateConfiguration | ||
where | ||
toPath GetBucketAccelerateConfiguration'{..} | ||
= mconcat ["/", toBS _gbacBucket] | ||
|
||
instance ToQuery GetBucketAccelerateConfiguration | ||
where | ||
toQuery = const (mconcat ["accelerate"]) | ||
|
||
-- | /See:/ 'getBucketAccelerateConfigurationResponse' smart constructor. | ||
data GetBucketAccelerateConfigurationResponse = GetBucketAccelerateConfigurationResponse' | ||
{ _gbacrsStatus :: !(Maybe BucketAccelerateStatus) | ||
, _gbacrsResponseStatus :: !Int | ||
} deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'GetBucketAccelerateConfigurationResponse' with the minimum fields required to make a request. | ||
-- | ||
-- Use one of the following lenses to modify other fields as desired: | ||
-- | ||
-- * 'gbacrsStatus' | ||
-- | ||
-- * 'gbacrsResponseStatus' | ||
getBucketAccelerateConfigurationResponse | ||
:: Int -- ^ 'gbacrsResponseStatus' | ||
-> GetBucketAccelerateConfigurationResponse | ||
getBucketAccelerateConfigurationResponse pResponseStatus_ = | ||
GetBucketAccelerateConfigurationResponse' | ||
{ _gbacrsStatus = Nothing | ||
, _gbacrsResponseStatus = pResponseStatus_ | ||
} | ||
|
||
-- | The accelerate configuration of the bucket. | ||
gbacrsStatus :: Lens' GetBucketAccelerateConfigurationResponse (Maybe BucketAccelerateStatus) | ||
gbacrsStatus = lens _gbacrsStatus (\ s a -> s{_gbacrsStatus = a}); | ||
|
||
-- | The response status code. | ||
gbacrsResponseStatus :: Lens' GetBucketAccelerateConfigurationResponse Int | ||
gbacrsResponseStatus = lens _gbacrsResponseStatus (\ s a -> s{_gbacrsResponseStatus = a}); | ||
|
||
instance NFData | ||
GetBucketAccelerateConfigurationResponse |
121 changes: 121 additions & 0 deletions
121
amazonka-s3/gen/Network/AWS/S3/PutBucketAccelerateConfiguration.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
{-# 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 #-} | ||
|
||
-- Derived from AWS service descriptions, licensed under Apache 2.0. | ||
|
||
-- | | ||
-- Module : Network.AWS.S3.PutBucketAccelerateConfiguration | ||
-- Copyright : (c) 2013-2016 Brendan Hay | ||
-- License : Mozilla Public License, v. 2.0. | ||
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> | ||
-- Stability : auto-generated | ||
-- Portability : non-portable (GHC extensions) | ||
-- | ||
-- Sets the accelerate configuration of an existing bucket. | ||
module Network.AWS.S3.PutBucketAccelerateConfiguration | ||
( | ||
-- * Creating a Request | ||
putBucketAccelerateConfiguration | ||
, PutBucketAccelerateConfiguration | ||
-- * Request Lenses | ||
, pbacBucket | ||
, pbacAccelerateConfiguration | ||
|
||
-- * Destructuring the Response | ||
, putBucketAccelerateConfigurationResponse | ||
, PutBucketAccelerateConfigurationResponse | ||
) 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 | ||
|
||
-- | /See:/ 'putBucketAccelerateConfiguration' smart constructor. | ||
data PutBucketAccelerateConfiguration = PutBucketAccelerateConfiguration' | ||
{ _pbacBucket :: !BucketName | ||
, _pbacAccelerateConfiguration :: !AccelerateConfiguration | ||
} deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'PutBucketAccelerateConfiguration' with the minimum fields required to make a request. | ||
-- | ||
-- Use one of the following lenses to modify other fields as desired: | ||
-- | ||
-- * 'pbacBucket' | ||
-- | ||
-- * 'pbacAccelerateConfiguration' | ||
putBucketAccelerateConfiguration | ||
:: BucketName -- ^ 'pbacBucket' | ||
-> AccelerateConfiguration -- ^ 'pbacAccelerateConfiguration' | ||
-> PutBucketAccelerateConfiguration | ||
putBucketAccelerateConfiguration pBucket_ pAccelerateConfiguration_ = | ||
PutBucketAccelerateConfiguration' | ||
{ _pbacBucket = pBucket_ | ||
, _pbacAccelerateConfiguration = pAccelerateConfiguration_ | ||
} | ||
|
||
-- | Name of the bucket for which the accelerate configuration is set. | ||
pbacBucket :: Lens' PutBucketAccelerateConfiguration BucketName | ||
pbacBucket = lens _pbacBucket (\ s a -> s{_pbacBucket = a}); | ||
|
||
-- | Specifies the Accelerate Configuration you want to set for the bucket. | ||
pbacAccelerateConfiguration :: Lens' PutBucketAccelerateConfiguration AccelerateConfiguration | ||
pbacAccelerateConfiguration = lens _pbacAccelerateConfiguration (\ s a -> s{_pbacAccelerateConfiguration = a}); | ||
|
||
instance AWSRequest PutBucketAccelerateConfiguration | ||
where | ||
type Rs PutBucketAccelerateConfiguration = | ||
PutBucketAccelerateConfigurationResponse | ||
request = putXML s3 | ||
response | ||
= receiveNull | ||
PutBucketAccelerateConfigurationResponse' | ||
|
||
instance Hashable PutBucketAccelerateConfiguration | ||
|
||
instance NFData PutBucketAccelerateConfiguration | ||
|
||
instance ToElement PutBucketAccelerateConfiguration | ||
where | ||
toElement | ||
= mkElement | ||
"{http://s3.amazonaws.com/doc/2006-03-01/}AccelerateConfiguration" | ||
. | ||
_pbacAccelerateConfiguration | ||
|
||
instance ToHeaders PutBucketAccelerateConfiguration | ||
where | ||
toHeaders = const mempty | ||
|
||
instance ToPath PutBucketAccelerateConfiguration | ||
where | ||
toPath PutBucketAccelerateConfiguration'{..} | ||
= mconcat ["/", toBS _pbacBucket] | ||
|
||
instance ToQuery PutBucketAccelerateConfiguration | ||
where | ||
toQuery = const (mconcat ["accelerate"]) | ||
|
||
-- | /See:/ 'putBucketAccelerateConfigurationResponse' smart constructor. | ||
data PutBucketAccelerateConfigurationResponse = | ||
PutBucketAccelerateConfigurationResponse' | ||
deriving (Eq,Read,Show,Data,Typeable,Generic) | ||
|
||
-- | Creates a value of 'PutBucketAccelerateConfigurationResponse' with the minimum fields required to make a request. | ||
-- | ||
putBucketAccelerateConfigurationResponse | ||
:: PutBucketAccelerateConfigurationResponse | ||
putBucketAccelerateConfigurationResponse = | ||
PutBucketAccelerateConfigurationResponse' | ||
|
||
instance NFData | ||
PutBucketAccelerateConfigurationResponse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.