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