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