{-# 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.DocumentDB.Types.DBClusterSnapshotAttributesResult where
import qualified Amazonka.Core as Core
import Amazonka.DocumentDB.Types.DBClusterSnapshotAttribute
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DBClusterSnapshotAttributesResult = DBClusterSnapshotAttributesResult'
{
DBClusterSnapshotAttributesResult -> Maybe Text
dbClusterSnapshotIdentifier :: Prelude.Maybe Prelude.Text,
DBClusterSnapshotAttributesResult
-> Maybe [DBClusterSnapshotAttribute]
dbClusterSnapshotAttributes :: Prelude.Maybe [DBClusterSnapshotAttribute]
}
deriving (DBClusterSnapshotAttributesResult
-> DBClusterSnapshotAttributesResult -> Bool
(DBClusterSnapshotAttributesResult
-> DBClusterSnapshotAttributesResult -> Bool)
-> (DBClusterSnapshotAttributesResult
-> DBClusterSnapshotAttributesResult -> Bool)
-> Eq DBClusterSnapshotAttributesResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBClusterSnapshotAttributesResult
-> DBClusterSnapshotAttributesResult -> Bool
$c/= :: DBClusterSnapshotAttributesResult
-> DBClusterSnapshotAttributesResult -> Bool
== :: DBClusterSnapshotAttributesResult
-> DBClusterSnapshotAttributesResult -> Bool
$c== :: DBClusterSnapshotAttributesResult
-> DBClusterSnapshotAttributesResult -> Bool
Prelude.Eq, ReadPrec [DBClusterSnapshotAttributesResult]
ReadPrec DBClusterSnapshotAttributesResult
Int -> ReadS DBClusterSnapshotAttributesResult
ReadS [DBClusterSnapshotAttributesResult]
(Int -> ReadS DBClusterSnapshotAttributesResult)
-> ReadS [DBClusterSnapshotAttributesResult]
-> ReadPrec DBClusterSnapshotAttributesResult
-> ReadPrec [DBClusterSnapshotAttributesResult]
-> Read DBClusterSnapshotAttributesResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DBClusterSnapshotAttributesResult]
$creadListPrec :: ReadPrec [DBClusterSnapshotAttributesResult]
readPrec :: ReadPrec DBClusterSnapshotAttributesResult
$creadPrec :: ReadPrec DBClusterSnapshotAttributesResult
readList :: ReadS [DBClusterSnapshotAttributesResult]
$creadList :: ReadS [DBClusterSnapshotAttributesResult]
readsPrec :: Int -> ReadS DBClusterSnapshotAttributesResult
$creadsPrec :: Int -> ReadS DBClusterSnapshotAttributesResult
Prelude.Read, Int -> DBClusterSnapshotAttributesResult -> ShowS
[DBClusterSnapshotAttributesResult] -> ShowS
DBClusterSnapshotAttributesResult -> String
(Int -> DBClusterSnapshotAttributesResult -> ShowS)
-> (DBClusterSnapshotAttributesResult -> String)
-> ([DBClusterSnapshotAttributesResult] -> ShowS)
-> Show DBClusterSnapshotAttributesResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBClusterSnapshotAttributesResult] -> ShowS
$cshowList :: [DBClusterSnapshotAttributesResult] -> ShowS
show :: DBClusterSnapshotAttributesResult -> String
$cshow :: DBClusterSnapshotAttributesResult -> String
showsPrec :: Int -> DBClusterSnapshotAttributesResult -> ShowS
$cshowsPrec :: Int -> DBClusterSnapshotAttributesResult -> ShowS
Prelude.Show, (forall x.
DBClusterSnapshotAttributesResult
-> Rep DBClusterSnapshotAttributesResult x)
-> (forall x.
Rep DBClusterSnapshotAttributesResult x
-> DBClusterSnapshotAttributesResult)
-> Generic DBClusterSnapshotAttributesResult
forall x.
Rep DBClusterSnapshotAttributesResult x
-> DBClusterSnapshotAttributesResult
forall x.
DBClusterSnapshotAttributesResult
-> Rep DBClusterSnapshotAttributesResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DBClusterSnapshotAttributesResult x
-> DBClusterSnapshotAttributesResult
$cfrom :: forall x.
DBClusterSnapshotAttributesResult
-> Rep DBClusterSnapshotAttributesResult x
Prelude.Generic)
newDBClusterSnapshotAttributesResult ::
DBClusterSnapshotAttributesResult
newDBClusterSnapshotAttributesResult :: DBClusterSnapshotAttributesResult
newDBClusterSnapshotAttributesResult =
DBClusterSnapshotAttributesResult' :: Maybe Text
-> Maybe [DBClusterSnapshotAttribute]
-> DBClusterSnapshotAttributesResult
DBClusterSnapshotAttributesResult'
{ $sel:dbClusterSnapshotIdentifier:DBClusterSnapshotAttributesResult' :: Maybe Text
dbClusterSnapshotIdentifier =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dbClusterSnapshotAttributes:DBClusterSnapshotAttributesResult' :: Maybe [DBClusterSnapshotAttribute]
dbClusterSnapshotAttributes =
Maybe [DBClusterSnapshotAttribute]
forall a. Maybe a
Prelude.Nothing
}
dbClusterSnapshotAttributesResult_dbClusterSnapshotIdentifier :: Lens.Lens' DBClusterSnapshotAttributesResult (Prelude.Maybe Prelude.Text)
dbClusterSnapshotAttributesResult_dbClusterSnapshotIdentifier :: (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshotAttributesResult
-> f DBClusterSnapshotAttributesResult
dbClusterSnapshotAttributesResult_dbClusterSnapshotIdentifier = (DBClusterSnapshotAttributesResult -> Maybe Text)
-> (DBClusterSnapshotAttributesResult
-> Maybe Text -> DBClusterSnapshotAttributesResult)
-> Lens
DBClusterSnapshotAttributesResult
DBClusterSnapshotAttributesResult
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshotAttributesResult' {Maybe Text
dbClusterSnapshotIdentifier :: Maybe Text
$sel:dbClusterSnapshotIdentifier:DBClusterSnapshotAttributesResult' :: DBClusterSnapshotAttributesResult -> Maybe Text
dbClusterSnapshotIdentifier} -> Maybe Text
dbClusterSnapshotIdentifier) (\s :: DBClusterSnapshotAttributesResult
s@DBClusterSnapshotAttributesResult' {} Maybe Text
a -> DBClusterSnapshotAttributesResult
s {$sel:dbClusterSnapshotIdentifier:DBClusterSnapshotAttributesResult' :: Maybe Text
dbClusterSnapshotIdentifier = Maybe Text
a} :: DBClusterSnapshotAttributesResult)
dbClusterSnapshotAttributesResult_dbClusterSnapshotAttributes :: Lens.Lens' DBClusterSnapshotAttributesResult (Prelude.Maybe [DBClusterSnapshotAttribute])
dbClusterSnapshotAttributesResult_dbClusterSnapshotAttributes :: (Maybe [DBClusterSnapshotAttribute]
-> f (Maybe [DBClusterSnapshotAttribute]))
-> DBClusterSnapshotAttributesResult
-> f DBClusterSnapshotAttributesResult
dbClusterSnapshotAttributesResult_dbClusterSnapshotAttributes = (DBClusterSnapshotAttributesResult
-> Maybe [DBClusterSnapshotAttribute])
-> (DBClusterSnapshotAttributesResult
-> Maybe [DBClusterSnapshotAttribute]
-> DBClusterSnapshotAttributesResult)
-> Lens
DBClusterSnapshotAttributesResult
DBClusterSnapshotAttributesResult
(Maybe [DBClusterSnapshotAttribute])
(Maybe [DBClusterSnapshotAttribute])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshotAttributesResult' {Maybe [DBClusterSnapshotAttribute]
dbClusterSnapshotAttributes :: Maybe [DBClusterSnapshotAttribute]
$sel:dbClusterSnapshotAttributes:DBClusterSnapshotAttributesResult' :: DBClusterSnapshotAttributesResult
-> Maybe [DBClusterSnapshotAttribute]
dbClusterSnapshotAttributes} -> Maybe [DBClusterSnapshotAttribute]
dbClusterSnapshotAttributes) (\s :: DBClusterSnapshotAttributesResult
s@DBClusterSnapshotAttributesResult' {} Maybe [DBClusterSnapshotAttribute]
a -> DBClusterSnapshotAttributesResult
s {$sel:dbClusterSnapshotAttributes:DBClusterSnapshotAttributesResult' :: Maybe [DBClusterSnapshotAttribute]
dbClusterSnapshotAttributes = Maybe [DBClusterSnapshotAttribute]
a} :: DBClusterSnapshotAttributesResult) ((Maybe [DBClusterSnapshotAttribute]
-> f (Maybe [DBClusterSnapshotAttribute]))
-> DBClusterSnapshotAttributesResult
-> f DBClusterSnapshotAttributesResult)
-> ((Maybe [DBClusterSnapshotAttribute]
-> f (Maybe [DBClusterSnapshotAttribute]))
-> Maybe [DBClusterSnapshotAttribute]
-> f (Maybe [DBClusterSnapshotAttribute]))
-> (Maybe [DBClusterSnapshotAttribute]
-> f (Maybe [DBClusterSnapshotAttribute]))
-> DBClusterSnapshotAttributesResult
-> f DBClusterSnapshotAttributesResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[DBClusterSnapshotAttribute]
[DBClusterSnapshotAttribute]
[DBClusterSnapshotAttribute]
[DBClusterSnapshotAttribute]
-> Iso
(Maybe [DBClusterSnapshotAttribute])
(Maybe [DBClusterSnapshotAttribute])
(Maybe [DBClusterSnapshotAttribute])
(Maybe [DBClusterSnapshotAttribute])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[DBClusterSnapshotAttribute]
[DBClusterSnapshotAttribute]
[DBClusterSnapshotAttribute]
[DBClusterSnapshotAttribute]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.FromXML
DBClusterSnapshotAttributesResult
where
parseXML :: [Node] -> Either String DBClusterSnapshotAttributesResult
parseXML [Node]
x =
Maybe Text
-> Maybe [DBClusterSnapshotAttribute]
-> DBClusterSnapshotAttributesResult
DBClusterSnapshotAttributesResult'
(Maybe Text
-> Maybe [DBClusterSnapshotAttribute]
-> DBClusterSnapshotAttributesResult)
-> Either String (Maybe Text)
-> Either
String
(Maybe [DBClusterSnapshotAttribute]
-> DBClusterSnapshotAttributesResult)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBClusterSnapshotIdentifier")
Either
String
(Maybe [DBClusterSnapshotAttribute]
-> DBClusterSnapshotAttributesResult)
-> Either String (Maybe [DBClusterSnapshotAttribute])
-> Either String DBClusterSnapshotAttributesResult
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBClusterSnapshotAttributes"
Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [DBClusterSnapshotAttribute]))
-> Either String (Maybe [DBClusterSnapshotAttribute])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [DBClusterSnapshotAttribute])
-> [Node] -> Either String (Maybe [DBClusterSnapshotAttribute])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may
(Text -> [Node] -> Either String [DBClusterSnapshotAttribute]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"DBClusterSnapshotAttribute")
)
instance
Prelude.Hashable
DBClusterSnapshotAttributesResult
instance
Prelude.NFData
DBClusterSnapshotAttributesResult