Skip to content

Commit

Permalink
Regenerating S3 from latest service definition
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanhay committed May 4, 2016
1 parent 1cf245d commit 3e65f86
Show file tree
Hide file tree
Showing 13 changed files with 382 additions and 3 deletions.
2 changes: 2 additions & 0 deletions amazonka-s3/amazonka-s3.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ library
, Network.AWS.S3.DeleteObject
, Network.AWS.S3.DeleteObjects
, Network.AWS.S3.GetBucketACL
, Network.AWS.S3.GetBucketAccelerateConfiguration
, Network.AWS.S3.GetBucketCORS
, Network.AWS.S3.GetBucketLifecycleConfiguration
, Network.AWS.S3.GetBucketLocation
Expand All @@ -84,6 +85,7 @@ library
, Network.AWS.S3.ListObjects
, Network.AWS.S3.ListParts
, Network.AWS.S3.PutBucketACL
, Network.AWS.S3.PutBucketAccelerateConfiguration
, Network.AWS.S3.PutBucketCORS
, Network.AWS.S3.PutBucketLifecycleConfiguration
, Network.AWS.S3.PutBucketLogging
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
16 changes: 16 additions & 0 deletions amazonka-s3/gen/Network/AWS/S3.hs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ module Network.AWS.S3
-- ** GetBucketNotificationConfiguration
, module Network.AWS.S3.GetBucketNotificationConfiguration

-- ** PutBucketAccelerateConfiguration
, module Network.AWS.S3.PutBucketAccelerateConfiguration

-- ** GetObject
, module Network.AWS.S3.GetObject

Expand Down Expand Up @@ -161,6 +164,9 @@ module Network.AWS.S3
-- ** PutBucketPolicy
, module Network.AWS.S3.PutBucketPolicy

-- ** GetBucketAccelerateConfiguration
, module Network.AWS.S3.GetBucketAccelerateConfiguration

-- ** GetObjectTorrent
, module Network.AWS.S3.GetObjectTorrent

Expand Down Expand Up @@ -226,6 +232,9 @@ module Network.AWS.S3
-- ** Re-exported Types
, module Network.AWS.S3.Internal

-- ** BucketAccelerateStatus
, BucketAccelerateStatus (..)

-- ** BucketCannedACL
, BucketCannedACL (..)

Expand Down Expand Up @@ -303,6 +312,11 @@ module Network.AWS.S3
, abortIncompleteMultipartUpload
, aimuDaysAfterInitiation

-- ** AccelerateConfiguration
, AccelerateConfiguration
, accelerateConfiguration
, acStatus

-- ** AccessControlPolicy
, AccessControlPolicy
, accessControlPolicy
Expand Down Expand Up @@ -680,6 +694,7 @@ import Network.AWS.S3.DeleteBucketTagging
import Network.AWS.S3.DeleteBucketWebsite
import Network.AWS.S3.DeleteObject
import Network.AWS.S3.DeleteObjects
import Network.AWS.S3.GetBucketAccelerateConfiguration
import Network.AWS.S3.GetBucketACL
import Network.AWS.S3.GetBucketCORS
import Network.AWS.S3.GetBucketLifecycleConfiguration
Expand All @@ -703,6 +718,7 @@ import Network.AWS.S3.ListMultipartUploads
import Network.AWS.S3.ListObjects
import Network.AWS.S3.ListObjectVersions
import Network.AWS.S3.ListParts
import Network.AWS.S3.PutBucketAccelerateConfiguration
import Network.AWS.S3.PutBucketACL
import Network.AWS.S3.PutBucketCORS
import Network.AWS.S3.PutBucketLifecycleConfiguration
Expand Down
126 changes: 126 additions & 0 deletions amazonka-s3/gen/Network/AWS/S3/GetBucketAccelerateConfiguration.hs
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 amazonka-s3/gen/Network/AWS/S3/PutBucketAccelerateConfiguration.hs
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
16 changes: 13 additions & 3 deletions amazonka-s3/gen/Network/AWS/S3/PutObjectACL.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module Network.AWS.S3.PutObjectACL
putObjectACL
, PutObjectACL
-- * Request Lenses
, poaVersionId
, poaGrantReadACP
, poaRequestPayer
, poaGrantWriteACP
Expand Down Expand Up @@ -55,7 +56,8 @@ import Network.AWS.S3.Types.Product

-- | /See:/ 'putObjectACL' smart constructor.
data PutObjectACL = PutObjectACL'
{ _poaGrantReadACP :: !(Maybe Text)
{ _poaVersionId :: !(Maybe ObjectVersionId)
, _poaGrantReadACP :: !(Maybe Text)
, _poaRequestPayer :: !(Maybe RequestPayer)
, _poaGrantWriteACP :: !(Maybe Text)
, _poaGrantRead :: !(Maybe Text)
Expand All @@ -72,6 +74,8 @@ data PutObjectACL = PutObjectACL'
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'poaVersionId'
--
-- * 'poaGrantReadACP'
--
-- * 'poaRequestPayer'
Expand Down Expand Up @@ -99,7 +103,8 @@ putObjectACL
-> PutObjectACL
putObjectACL pBucket_ pKey_ =
PutObjectACL'
{ _poaGrantReadACP = Nothing
{ _poaVersionId = Nothing
, _poaGrantReadACP = Nothing
, _poaRequestPayer = Nothing
, _poaGrantWriteACP = Nothing
, _poaGrantRead = Nothing
Expand All @@ -112,6 +117,10 @@ putObjectACL pBucket_ pKey_ =
, _poaKey = pKey_
}

-- | VersionId used to reference a specific version of the object.
poaVersionId :: Lens' PutObjectACL (Maybe ObjectVersionId)
poaVersionId = lens _poaVersionId (\ s a -> s{_poaVersionId = a});

-- | Allows grantee to read the bucket ACL.
poaGrantReadACP :: Lens' PutObjectACL (Maybe Text)
poaGrantReadACP = lens _poaGrantReadACP (\ s a -> s{_poaGrantReadACP = a});
Expand Down Expand Up @@ -196,7 +205,8 @@ instance ToPath PutObjectACL where
= mconcat ["/", toBS _poaBucket, "/", toBS _poaKey]

instance ToQuery PutObjectACL where
toQuery = const (mconcat ["acl"])
toQuery PutObjectACL'{..}
= mconcat ["versionId" =: _poaVersionId, "acl"]

-- | /See:/ 'putObjectACLResponse' smart constructor.
data PutObjectACLResponse = PutObjectACLResponse'
Expand Down
Loading

0 comments on commit 3e65f86

Please sign in to comment.