{-# 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.AccelerateConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.S3.Internal
import Amazonka.S3.Types.BucketAccelerateStatus
data AccelerateConfiguration = AccelerateConfiguration'
{
AccelerateConfiguration -> Maybe BucketAccelerateStatus
status :: Prelude.Maybe BucketAccelerateStatus
}
deriving (AccelerateConfiguration -> AccelerateConfiguration -> Bool
(AccelerateConfiguration -> AccelerateConfiguration -> Bool)
-> (AccelerateConfiguration -> AccelerateConfiguration -> Bool)
-> Eq AccelerateConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelerateConfiguration -> AccelerateConfiguration -> Bool
$c/= :: AccelerateConfiguration -> AccelerateConfiguration -> Bool
== :: AccelerateConfiguration -> AccelerateConfiguration -> Bool
$c== :: AccelerateConfiguration -> AccelerateConfiguration -> Bool
Prelude.Eq, ReadPrec [AccelerateConfiguration]
ReadPrec AccelerateConfiguration
Int -> ReadS AccelerateConfiguration
ReadS [AccelerateConfiguration]
(Int -> ReadS AccelerateConfiguration)
-> ReadS [AccelerateConfiguration]
-> ReadPrec AccelerateConfiguration
-> ReadPrec [AccelerateConfiguration]
-> Read AccelerateConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccelerateConfiguration]
$creadListPrec :: ReadPrec [AccelerateConfiguration]
readPrec :: ReadPrec AccelerateConfiguration
$creadPrec :: ReadPrec AccelerateConfiguration
readList :: ReadS [AccelerateConfiguration]
$creadList :: ReadS [AccelerateConfiguration]
readsPrec :: Int -> ReadS AccelerateConfiguration
$creadsPrec :: Int -> ReadS AccelerateConfiguration
Prelude.Read, Int -> AccelerateConfiguration -> ShowS
[AccelerateConfiguration] -> ShowS
AccelerateConfiguration -> String
(Int -> AccelerateConfiguration -> ShowS)
-> (AccelerateConfiguration -> String)
-> ([AccelerateConfiguration] -> ShowS)
-> Show AccelerateConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccelerateConfiguration] -> ShowS
$cshowList :: [AccelerateConfiguration] -> ShowS
show :: AccelerateConfiguration -> String
$cshow :: AccelerateConfiguration -> String
showsPrec :: Int -> AccelerateConfiguration -> ShowS
$cshowsPrec :: Int -> AccelerateConfiguration -> ShowS
Prelude.Show, (forall x.
AccelerateConfiguration -> Rep AccelerateConfiguration x)
-> (forall x.
Rep AccelerateConfiguration x -> AccelerateConfiguration)
-> Generic AccelerateConfiguration
forall x. Rep AccelerateConfiguration x -> AccelerateConfiguration
forall x. AccelerateConfiguration -> Rep AccelerateConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AccelerateConfiguration x -> AccelerateConfiguration
$cfrom :: forall x. AccelerateConfiguration -> Rep AccelerateConfiguration x
Prelude.Generic)
newAccelerateConfiguration ::
AccelerateConfiguration
newAccelerateConfiguration :: AccelerateConfiguration
newAccelerateConfiguration =
AccelerateConfiguration' :: Maybe BucketAccelerateStatus -> AccelerateConfiguration
AccelerateConfiguration' {$sel:status:AccelerateConfiguration' :: Maybe BucketAccelerateStatus
status = Maybe BucketAccelerateStatus
forall a. Maybe a
Prelude.Nothing}
accelerateConfiguration_status :: Lens.Lens' AccelerateConfiguration (Prelude.Maybe BucketAccelerateStatus)
accelerateConfiguration_status :: (Maybe BucketAccelerateStatus -> f (Maybe BucketAccelerateStatus))
-> AccelerateConfiguration -> f AccelerateConfiguration
accelerateConfiguration_status = (AccelerateConfiguration -> Maybe BucketAccelerateStatus)
-> (AccelerateConfiguration
-> Maybe BucketAccelerateStatus -> AccelerateConfiguration)
-> Lens
AccelerateConfiguration
AccelerateConfiguration
(Maybe BucketAccelerateStatus)
(Maybe BucketAccelerateStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccelerateConfiguration' {Maybe BucketAccelerateStatus
status :: Maybe BucketAccelerateStatus
$sel:status:AccelerateConfiguration' :: AccelerateConfiguration -> Maybe BucketAccelerateStatus
status} -> Maybe BucketAccelerateStatus
status) (\s :: AccelerateConfiguration
s@AccelerateConfiguration' {} Maybe BucketAccelerateStatus
a -> AccelerateConfiguration
s {$sel:status:AccelerateConfiguration' :: Maybe BucketAccelerateStatus
status = Maybe BucketAccelerateStatus
a} :: AccelerateConfiguration)
instance Prelude.Hashable AccelerateConfiguration
instance Prelude.NFData AccelerateConfiguration
instance Core.ToXML AccelerateConfiguration where
toXML :: AccelerateConfiguration -> XML
toXML AccelerateConfiguration' {Maybe BucketAccelerateStatus
status :: Maybe BucketAccelerateStatus
$sel:status:AccelerateConfiguration' :: AccelerateConfiguration -> Maybe BucketAccelerateStatus
..} =
[XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat [Name
"Status" Name -> Maybe BucketAccelerateStatus -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe BucketAccelerateStatus
status]