{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.S3.Types.CreateBucketConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.S3.Internal
data CreateBucketConfiguration = CreateBucketConfiguration'
{
CreateBucketConfiguration -> Maybe LocationConstraint
locationConstraint :: Prelude.Maybe LocationConstraint
}
deriving (CreateBucketConfiguration -> CreateBucketConfiguration -> Bool
(CreateBucketConfiguration -> CreateBucketConfiguration -> Bool)
-> (CreateBucketConfiguration -> CreateBucketConfiguration -> Bool)
-> Eq CreateBucketConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateBucketConfiguration -> CreateBucketConfiguration -> Bool
$c/= :: CreateBucketConfiguration -> CreateBucketConfiguration -> Bool
== :: CreateBucketConfiguration -> CreateBucketConfiguration -> Bool
$c== :: CreateBucketConfiguration -> CreateBucketConfiguration -> Bool
Prelude.Eq, ReadPrec [CreateBucketConfiguration]
ReadPrec CreateBucketConfiguration
Int -> ReadS CreateBucketConfiguration
ReadS [CreateBucketConfiguration]
(Int -> ReadS CreateBucketConfiguration)
-> ReadS [CreateBucketConfiguration]
-> ReadPrec CreateBucketConfiguration
-> ReadPrec [CreateBucketConfiguration]
-> Read CreateBucketConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateBucketConfiguration]
$creadListPrec :: ReadPrec [CreateBucketConfiguration]
readPrec :: ReadPrec CreateBucketConfiguration
$creadPrec :: ReadPrec CreateBucketConfiguration
readList :: ReadS [CreateBucketConfiguration]
$creadList :: ReadS [CreateBucketConfiguration]
readsPrec :: Int -> ReadS CreateBucketConfiguration
$creadsPrec :: Int -> ReadS CreateBucketConfiguration
Prelude.Read, Int -> CreateBucketConfiguration -> ShowS
[CreateBucketConfiguration] -> ShowS
CreateBucketConfiguration -> String
(Int -> CreateBucketConfiguration -> ShowS)
-> (CreateBucketConfiguration -> String)
-> ([CreateBucketConfiguration] -> ShowS)
-> Show CreateBucketConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateBucketConfiguration] -> ShowS
$cshowList :: [CreateBucketConfiguration] -> ShowS
show :: CreateBucketConfiguration -> String
$cshow :: CreateBucketConfiguration -> String
showsPrec :: Int -> CreateBucketConfiguration -> ShowS
$cshowsPrec :: Int -> CreateBucketConfiguration -> ShowS
Prelude.Show, (forall x.
CreateBucketConfiguration -> Rep CreateBucketConfiguration x)
-> (forall x.
Rep CreateBucketConfiguration x -> CreateBucketConfiguration)
-> Generic CreateBucketConfiguration
forall x.
Rep CreateBucketConfiguration x -> CreateBucketConfiguration
forall x.
CreateBucketConfiguration -> Rep CreateBucketConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateBucketConfiguration x -> CreateBucketConfiguration
$cfrom :: forall x.
CreateBucketConfiguration -> Rep CreateBucketConfiguration x
Prelude.Generic)
newCreateBucketConfiguration ::
CreateBucketConfiguration
newCreateBucketConfiguration :: CreateBucketConfiguration
newCreateBucketConfiguration =
CreateBucketConfiguration' :: Maybe LocationConstraint -> CreateBucketConfiguration
CreateBucketConfiguration'
{ $sel:locationConstraint:CreateBucketConfiguration' :: Maybe LocationConstraint
locationConstraint =
Maybe LocationConstraint
forall a. Maybe a
Prelude.Nothing
}
createBucketConfiguration_locationConstraint :: Lens.Lens' CreateBucketConfiguration (Prelude.Maybe LocationConstraint)
createBucketConfiguration_locationConstraint :: (Maybe LocationConstraint -> f (Maybe LocationConstraint))
-> CreateBucketConfiguration -> f CreateBucketConfiguration
createBucketConfiguration_locationConstraint = (CreateBucketConfiguration -> Maybe LocationConstraint)
-> (CreateBucketConfiguration
-> Maybe LocationConstraint -> CreateBucketConfiguration)
-> Lens
CreateBucketConfiguration
CreateBucketConfiguration
(Maybe LocationConstraint)
(Maybe LocationConstraint)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBucketConfiguration' {Maybe LocationConstraint
locationConstraint :: Maybe LocationConstraint
$sel:locationConstraint:CreateBucketConfiguration' :: CreateBucketConfiguration -> Maybe LocationConstraint
locationConstraint} -> Maybe LocationConstraint
locationConstraint) (\s :: CreateBucketConfiguration
s@CreateBucketConfiguration' {} Maybe LocationConstraint
a -> CreateBucketConfiguration
s {$sel:locationConstraint:CreateBucketConfiguration' :: Maybe LocationConstraint
locationConstraint = Maybe LocationConstraint
a} :: CreateBucketConfiguration)
instance Prelude.Hashable CreateBucketConfiguration
instance Prelude.NFData CreateBucketConfiguration
instance Core.ToXML CreateBucketConfiguration where
toXML :: CreateBucketConfiguration -> XML
toXML CreateBucketConfiguration' {Maybe LocationConstraint
locationConstraint :: Maybe LocationConstraint
$sel:locationConstraint:CreateBucketConfiguration' :: CreateBucketConfiguration -> Maybe LocationConstraint
..} =
[XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat
[Name
"LocationConstraint" Name -> Maybe LocationConstraint -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe LocationConstraint
locationConstraint]