{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.S3.PutBucketAccelerateConfiguration
(
PutBucketAccelerateConfiguration (..),
newPutBucketAccelerateConfiguration,
putBucketAccelerateConfiguration_expectedBucketOwner,
putBucketAccelerateConfiguration_bucket,
putBucketAccelerateConfiguration_accelerateConfiguration,
PutBucketAccelerateConfigurationResponse (..),
newPutBucketAccelerateConfigurationResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.S3.Types
data PutBucketAccelerateConfiguration = PutBucketAccelerateConfiguration'
{
PutBucketAccelerateConfiguration -> Maybe Text
expectedBucketOwner :: Prelude.Maybe Prelude.Text,
PutBucketAccelerateConfiguration -> BucketName
bucket :: BucketName,
PutBucketAccelerateConfiguration -> AccelerateConfiguration
accelerateConfiguration :: AccelerateConfiguration
}
deriving (PutBucketAccelerateConfiguration
-> PutBucketAccelerateConfiguration -> Bool
(PutBucketAccelerateConfiguration
-> PutBucketAccelerateConfiguration -> Bool)
-> (PutBucketAccelerateConfiguration
-> PutBucketAccelerateConfiguration -> Bool)
-> Eq PutBucketAccelerateConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutBucketAccelerateConfiguration
-> PutBucketAccelerateConfiguration -> Bool
$c/= :: PutBucketAccelerateConfiguration
-> PutBucketAccelerateConfiguration -> Bool
== :: PutBucketAccelerateConfiguration
-> PutBucketAccelerateConfiguration -> Bool
$c== :: PutBucketAccelerateConfiguration
-> PutBucketAccelerateConfiguration -> Bool
Prelude.Eq, ReadPrec [PutBucketAccelerateConfiguration]
ReadPrec PutBucketAccelerateConfiguration
Int -> ReadS PutBucketAccelerateConfiguration
ReadS [PutBucketAccelerateConfiguration]
(Int -> ReadS PutBucketAccelerateConfiguration)
-> ReadS [PutBucketAccelerateConfiguration]
-> ReadPrec PutBucketAccelerateConfiguration
-> ReadPrec [PutBucketAccelerateConfiguration]
-> Read PutBucketAccelerateConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutBucketAccelerateConfiguration]
$creadListPrec :: ReadPrec [PutBucketAccelerateConfiguration]
readPrec :: ReadPrec PutBucketAccelerateConfiguration
$creadPrec :: ReadPrec PutBucketAccelerateConfiguration
readList :: ReadS [PutBucketAccelerateConfiguration]
$creadList :: ReadS [PutBucketAccelerateConfiguration]
readsPrec :: Int -> ReadS PutBucketAccelerateConfiguration
$creadsPrec :: Int -> ReadS PutBucketAccelerateConfiguration
Prelude.Read, Int -> PutBucketAccelerateConfiguration -> ShowS
[PutBucketAccelerateConfiguration] -> ShowS
PutBucketAccelerateConfiguration -> String
(Int -> PutBucketAccelerateConfiguration -> ShowS)
-> (PutBucketAccelerateConfiguration -> String)
-> ([PutBucketAccelerateConfiguration] -> ShowS)
-> Show PutBucketAccelerateConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutBucketAccelerateConfiguration] -> ShowS
$cshowList :: [PutBucketAccelerateConfiguration] -> ShowS
show :: PutBucketAccelerateConfiguration -> String
$cshow :: PutBucketAccelerateConfiguration -> String
showsPrec :: Int -> PutBucketAccelerateConfiguration -> ShowS
$cshowsPrec :: Int -> PutBucketAccelerateConfiguration -> ShowS
Prelude.Show, (forall x.
PutBucketAccelerateConfiguration
-> Rep PutBucketAccelerateConfiguration x)
-> (forall x.
Rep PutBucketAccelerateConfiguration x
-> PutBucketAccelerateConfiguration)
-> Generic PutBucketAccelerateConfiguration
forall x.
Rep PutBucketAccelerateConfiguration x
-> PutBucketAccelerateConfiguration
forall x.
PutBucketAccelerateConfiguration
-> Rep PutBucketAccelerateConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutBucketAccelerateConfiguration x
-> PutBucketAccelerateConfiguration
$cfrom :: forall x.
PutBucketAccelerateConfiguration
-> Rep PutBucketAccelerateConfiguration x
Prelude.Generic)
newPutBucketAccelerateConfiguration ::
BucketName ->
AccelerateConfiguration ->
PutBucketAccelerateConfiguration
newPutBucketAccelerateConfiguration :: BucketName
-> AccelerateConfiguration -> PutBucketAccelerateConfiguration
newPutBucketAccelerateConfiguration
BucketName
pBucket_
AccelerateConfiguration
pAccelerateConfiguration_ =
PutBucketAccelerateConfiguration' :: Maybe Text
-> BucketName
-> AccelerateConfiguration
-> PutBucketAccelerateConfiguration
PutBucketAccelerateConfiguration'
{ $sel:expectedBucketOwner:PutBucketAccelerateConfiguration' :: Maybe Text
expectedBucketOwner =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:bucket:PutBucketAccelerateConfiguration' :: BucketName
bucket = BucketName
pBucket_,
$sel:accelerateConfiguration:PutBucketAccelerateConfiguration' :: AccelerateConfiguration
accelerateConfiguration =
AccelerateConfiguration
pAccelerateConfiguration_
}
putBucketAccelerateConfiguration_expectedBucketOwner :: Lens.Lens' PutBucketAccelerateConfiguration (Prelude.Maybe Prelude.Text)
putBucketAccelerateConfiguration_expectedBucketOwner :: (Maybe Text -> f (Maybe Text))
-> PutBucketAccelerateConfiguration
-> f PutBucketAccelerateConfiguration
putBucketAccelerateConfiguration_expectedBucketOwner = (PutBucketAccelerateConfiguration -> Maybe Text)
-> (PutBucketAccelerateConfiguration
-> Maybe Text -> PutBucketAccelerateConfiguration)
-> Lens
PutBucketAccelerateConfiguration
PutBucketAccelerateConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBucketAccelerateConfiguration' {Maybe Text
expectedBucketOwner :: Maybe Text
$sel:expectedBucketOwner:PutBucketAccelerateConfiguration' :: PutBucketAccelerateConfiguration -> Maybe Text
expectedBucketOwner} -> Maybe Text
expectedBucketOwner) (\s :: PutBucketAccelerateConfiguration
s@PutBucketAccelerateConfiguration' {} Maybe Text
a -> PutBucketAccelerateConfiguration
s {$sel:expectedBucketOwner:PutBucketAccelerateConfiguration' :: Maybe Text
expectedBucketOwner = Maybe Text
a} :: PutBucketAccelerateConfiguration)
putBucketAccelerateConfiguration_bucket :: Lens.Lens' PutBucketAccelerateConfiguration BucketName
putBucketAccelerateConfiguration_bucket :: (BucketName -> f BucketName)
-> PutBucketAccelerateConfiguration
-> f PutBucketAccelerateConfiguration
putBucketAccelerateConfiguration_bucket = (PutBucketAccelerateConfiguration -> BucketName)
-> (PutBucketAccelerateConfiguration
-> BucketName -> PutBucketAccelerateConfiguration)
-> Lens
PutBucketAccelerateConfiguration
PutBucketAccelerateConfiguration
BucketName
BucketName
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBucketAccelerateConfiguration' {BucketName
bucket :: BucketName
$sel:bucket:PutBucketAccelerateConfiguration' :: PutBucketAccelerateConfiguration -> BucketName
bucket} -> BucketName
bucket) (\s :: PutBucketAccelerateConfiguration
s@PutBucketAccelerateConfiguration' {} BucketName
a -> PutBucketAccelerateConfiguration
s {$sel:bucket:PutBucketAccelerateConfiguration' :: BucketName
bucket = BucketName
a} :: PutBucketAccelerateConfiguration)
putBucketAccelerateConfiguration_accelerateConfiguration :: Lens.Lens' PutBucketAccelerateConfiguration AccelerateConfiguration
putBucketAccelerateConfiguration_accelerateConfiguration :: (AccelerateConfiguration -> f AccelerateConfiguration)
-> PutBucketAccelerateConfiguration
-> f PutBucketAccelerateConfiguration
putBucketAccelerateConfiguration_accelerateConfiguration = (PutBucketAccelerateConfiguration -> AccelerateConfiguration)
-> (PutBucketAccelerateConfiguration
-> AccelerateConfiguration -> PutBucketAccelerateConfiguration)
-> Lens
PutBucketAccelerateConfiguration
PutBucketAccelerateConfiguration
AccelerateConfiguration
AccelerateConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBucketAccelerateConfiguration' {AccelerateConfiguration
accelerateConfiguration :: AccelerateConfiguration
$sel:accelerateConfiguration:PutBucketAccelerateConfiguration' :: PutBucketAccelerateConfiguration -> AccelerateConfiguration
accelerateConfiguration} -> AccelerateConfiguration
accelerateConfiguration) (\s :: PutBucketAccelerateConfiguration
s@PutBucketAccelerateConfiguration' {} AccelerateConfiguration
a -> PutBucketAccelerateConfiguration
s {$sel:accelerateConfiguration:PutBucketAccelerateConfiguration' :: AccelerateConfiguration
accelerateConfiguration = AccelerateConfiguration
a} :: PutBucketAccelerateConfiguration)
instance
Core.AWSRequest
PutBucketAccelerateConfiguration
where
type
AWSResponse PutBucketAccelerateConfiguration =
PutBucketAccelerateConfigurationResponse
request :: PutBucketAccelerateConfiguration
-> Request PutBucketAccelerateConfiguration
request =
Request PutBucketAccelerateConfiguration
-> Request PutBucketAccelerateConfiguration
forall a. Request a -> Request a
Request.s3vhost
(Request PutBucketAccelerateConfiguration
-> Request PutBucketAccelerateConfiguration)
-> (PutBucketAccelerateConfiguration
-> Request PutBucketAccelerateConfiguration)
-> PutBucketAccelerateConfiguration
-> Request PutBucketAccelerateConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Service
-> PutBucketAccelerateConfiguration
-> Request PutBucketAccelerateConfiguration
forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.putXML Service
defaultService
response :: Logger
-> Service
-> Proxy PutBucketAccelerateConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse PutBucketAccelerateConfiguration)))
response =
AWSResponse PutBucketAccelerateConfiguration
-> Logger
-> Service
-> Proxy PutBucketAccelerateConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse PutBucketAccelerateConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse PutBucketAccelerateConfiguration
PutBucketAccelerateConfigurationResponse
PutBucketAccelerateConfigurationResponse'
instance
Prelude.Hashable
PutBucketAccelerateConfiguration
instance
Prelude.NFData
PutBucketAccelerateConfiguration
instance
Core.ToElement
PutBucketAccelerateConfiguration
where
toElement :: PutBucketAccelerateConfiguration -> Element
toElement PutBucketAccelerateConfiguration' {Maybe Text
BucketName
AccelerateConfiguration
accelerateConfiguration :: AccelerateConfiguration
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:accelerateConfiguration:PutBucketAccelerateConfiguration' :: PutBucketAccelerateConfiguration -> AccelerateConfiguration
$sel:bucket:PutBucketAccelerateConfiguration' :: PutBucketAccelerateConfiguration -> BucketName
$sel:expectedBucketOwner:PutBucketAccelerateConfiguration' :: PutBucketAccelerateConfiguration -> Maybe Text
..} =
Name -> AccelerateConfiguration -> Element
forall a. ToXML a => Name -> a -> Element
Core.mkElement
Name
"{http://s3.amazonaws.com/doc/2006-03-01/}AccelerateConfiguration"
AccelerateConfiguration
accelerateConfiguration
instance
Core.ToHeaders
PutBucketAccelerateConfiguration
where
toHeaders :: PutBucketAccelerateConfiguration -> [Header]
toHeaders PutBucketAccelerateConfiguration' {Maybe Text
BucketName
AccelerateConfiguration
accelerateConfiguration :: AccelerateConfiguration
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:accelerateConfiguration:PutBucketAccelerateConfiguration' :: PutBucketAccelerateConfiguration -> AccelerateConfiguration
$sel:bucket:PutBucketAccelerateConfiguration' :: PutBucketAccelerateConfiguration -> BucketName
$sel:expectedBucketOwner:PutBucketAccelerateConfiguration' :: PutBucketAccelerateConfiguration -> Maybe Text
..} =
[[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"x-amz-expected-bucket-owner"
HeaderName -> Maybe Text -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# Maybe Text
expectedBucketOwner
]
instance Core.ToPath PutBucketAccelerateConfiguration where
toPath :: PutBucketAccelerateConfiguration -> ByteString
toPath PutBucketAccelerateConfiguration' {Maybe Text
BucketName
AccelerateConfiguration
accelerateConfiguration :: AccelerateConfiguration
bucket :: BucketName
expectedBucketOwner :: Maybe Text
$sel:accelerateConfiguration:PutBucketAccelerateConfiguration' :: PutBucketAccelerateConfiguration -> AccelerateConfiguration
$sel:bucket:PutBucketAccelerateConfiguration' :: PutBucketAccelerateConfiguration -> BucketName
$sel:expectedBucketOwner:PutBucketAccelerateConfiguration' :: PutBucketAccelerateConfiguration -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/", BucketName -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS BucketName
bucket]
instance
Core.ToQuery
PutBucketAccelerateConfiguration
where
toQuery :: PutBucketAccelerateConfiguration -> QueryString
toQuery =
QueryString -> PutBucketAccelerateConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const ([QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [QueryString
"accelerate"])
data PutBucketAccelerateConfigurationResponse = PutBucketAccelerateConfigurationResponse'
{
}
deriving (PutBucketAccelerateConfigurationResponse
-> PutBucketAccelerateConfigurationResponse -> Bool
(PutBucketAccelerateConfigurationResponse
-> PutBucketAccelerateConfigurationResponse -> Bool)
-> (PutBucketAccelerateConfigurationResponse
-> PutBucketAccelerateConfigurationResponse -> Bool)
-> Eq PutBucketAccelerateConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutBucketAccelerateConfigurationResponse
-> PutBucketAccelerateConfigurationResponse -> Bool
$c/= :: PutBucketAccelerateConfigurationResponse
-> PutBucketAccelerateConfigurationResponse -> Bool
== :: PutBucketAccelerateConfigurationResponse
-> PutBucketAccelerateConfigurationResponse -> Bool
$c== :: PutBucketAccelerateConfigurationResponse
-> PutBucketAccelerateConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [PutBucketAccelerateConfigurationResponse]
ReadPrec PutBucketAccelerateConfigurationResponse
Int -> ReadS PutBucketAccelerateConfigurationResponse
ReadS [PutBucketAccelerateConfigurationResponse]
(Int -> ReadS PutBucketAccelerateConfigurationResponse)
-> ReadS [PutBucketAccelerateConfigurationResponse]
-> ReadPrec PutBucketAccelerateConfigurationResponse
-> ReadPrec [PutBucketAccelerateConfigurationResponse]
-> Read PutBucketAccelerateConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutBucketAccelerateConfigurationResponse]
$creadListPrec :: ReadPrec [PutBucketAccelerateConfigurationResponse]
readPrec :: ReadPrec PutBucketAccelerateConfigurationResponse
$creadPrec :: ReadPrec PutBucketAccelerateConfigurationResponse
readList :: ReadS [PutBucketAccelerateConfigurationResponse]
$creadList :: ReadS [PutBucketAccelerateConfigurationResponse]
readsPrec :: Int -> ReadS PutBucketAccelerateConfigurationResponse
$creadsPrec :: Int -> ReadS PutBucketAccelerateConfigurationResponse
Prelude.Read, Int -> PutBucketAccelerateConfigurationResponse -> ShowS
[PutBucketAccelerateConfigurationResponse] -> ShowS
PutBucketAccelerateConfigurationResponse -> String
(Int -> PutBucketAccelerateConfigurationResponse -> ShowS)
-> (PutBucketAccelerateConfigurationResponse -> String)
-> ([PutBucketAccelerateConfigurationResponse] -> ShowS)
-> Show PutBucketAccelerateConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutBucketAccelerateConfigurationResponse] -> ShowS
$cshowList :: [PutBucketAccelerateConfigurationResponse] -> ShowS
show :: PutBucketAccelerateConfigurationResponse -> String
$cshow :: PutBucketAccelerateConfigurationResponse -> String
showsPrec :: Int -> PutBucketAccelerateConfigurationResponse -> ShowS
$cshowsPrec :: Int -> PutBucketAccelerateConfigurationResponse -> ShowS
Prelude.Show, (forall x.
PutBucketAccelerateConfigurationResponse
-> Rep PutBucketAccelerateConfigurationResponse x)
-> (forall x.
Rep PutBucketAccelerateConfigurationResponse x
-> PutBucketAccelerateConfigurationResponse)
-> Generic PutBucketAccelerateConfigurationResponse
forall x.
Rep PutBucketAccelerateConfigurationResponse x
-> PutBucketAccelerateConfigurationResponse
forall x.
PutBucketAccelerateConfigurationResponse
-> Rep PutBucketAccelerateConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutBucketAccelerateConfigurationResponse x
-> PutBucketAccelerateConfigurationResponse
$cfrom :: forall x.
PutBucketAccelerateConfigurationResponse
-> Rep PutBucketAccelerateConfigurationResponse x
Prelude.Generic)
newPutBucketAccelerateConfigurationResponse ::
PutBucketAccelerateConfigurationResponse
newPutBucketAccelerateConfigurationResponse :: PutBucketAccelerateConfigurationResponse
newPutBucketAccelerateConfigurationResponse =
PutBucketAccelerateConfigurationResponse
PutBucketAccelerateConfigurationResponse'
instance
Prelude.NFData
PutBucketAccelerateConfigurationResponse