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