{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.S3.Internal
data CreateBucketConfiguration = CreateBucketConfiguration'
{
CreateBucketConfiguration -> Maybe LocationConstraint
locationConstraint :: Prelude.Maybe LocationConstraint
}
deriving (CreateBucketConfiguration -> CreateBucketConfiguration -> Bool
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]
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
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.
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'
{ $sel:locationConstraint:CreateBucketConfiguration' :: Maybe LocationConstraint
locationConstraint =
forall a. Maybe a
Prelude.Nothing
}
createBucketConfiguration_locationConstraint :: Lens.Lens' CreateBucketConfiguration (Prelude.Maybe LocationConstraint)
createBucketConfiguration_locationConstraint :: Lens' CreateBucketConfiguration (Maybe LocationConstraint)
createBucketConfiguration_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 where
hashWithSalt :: Int -> CreateBucketConfiguration -> Int
hashWithSalt Int
_salt CreateBucketConfiguration' {Maybe LocationConstraint
locationConstraint :: Maybe LocationConstraint
$sel:locationConstraint:CreateBucketConfiguration' :: CreateBucketConfiguration -> Maybe LocationConstraint
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LocationConstraint
locationConstraint
instance Prelude.NFData CreateBucketConfiguration where
rnf :: CreateBucketConfiguration -> ()
rnf CreateBucketConfiguration' {Maybe LocationConstraint
locationConstraint :: Maybe LocationConstraint
$sel:locationConstraint:CreateBucketConfiguration' :: CreateBucketConfiguration -> Maybe LocationConstraint
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe LocationConstraint
locationConstraint
instance Data.ToXML CreateBucketConfiguration where
toXML :: CreateBucketConfiguration -> XML
toXML CreateBucketConfiguration' {Maybe LocationConstraint
locationConstraint :: Maybe LocationConstraint
$sel:locationConstraint:CreateBucketConfiguration' :: CreateBucketConfiguration -> Maybe LocationConstraint
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[Name
"LocationConstraint" forall a. ToXML a => Name -> a -> XML
Data.@= Maybe LocationConstraint
locationConstraint]